#Lacking in Trigonometry

9 messages · Page 1 of 1 (latest)

supple solstice
#

I would like some help on patching up a function I'm unable to complete. I have a value oscillating between two coordinates with a fixed radius, and the goal is to rotate the angle of said oscillation.

#

Right now these two lines of code allow me to have an object make a full circle.

y = ystart + halfpipe_yoff + lengthdir_y(198+hp_offset,angle);
x = xstart + halfpipe_xoff + lengthdir_x(198+hp_offset,angle);
#

If I isolate y for example, it'll do just what my problem suggests. It oscillates up and down between 198 and -198 around ystart.

#

Same for x, except it'll go left and right, hence the perfect circular motion.

#

I think that's the gist of my problem.

#

Don't hesitate to @ me !

supple solstice
indigo owl
#

your current code should be able do that by just changing the arguments you pass to the lengthdir

#

so instead of passing a hard 198 + hp_offset, you combine that into one variable that you have go back and forth between positive and negative