Heya Saffith.
I'd wondered about a mathematics of movement guide awhile ago. Still wondering about that. I'd like an FFC to fly arond in a figure-8. I'll do some research on how to set this up, but I suspect that you already know how to do this more efficently that I'll figure.
Ah, yeah. I haven't forgotten that post, I'm just taking forever to respond.
A figure eight's not too hard. If you think about it, it's really the same as movement in an ellipse, except it's twice as fast along one axis. This is pretty much it:
for(int i=0; true; i=(i+1)%360)
{
this->X=xCenter+xRadius*Sin(2*i);
this->Y=yCenter+yRadius*Cos(i);
Waitframe();
}
That's vertical; put the 2*i in the cosine instead of the sine for horizontal. Also, that'll start at the bottom. If you add to i, it'll start elsewhere. So, for example, [font="Courier New"]Sin(2*(i+90))[/font] and [font="Courier New"]Cos(i+90)[/font] will start at the center. If you want to adjust the speed, just multiply the numbers passed to Sin and Cos. You may have to change the 360 in that case, though.