Morning all...
I've been playing about with some sprite movements, especially trying to get them to move around curves/arcs.
However I'm getting totally confused over the mathematics behind it, and really would appreciate some help (maths was never my forte at school some 16 years ago...!)
For example, if I use the following code...
sprite 1,screen width()/2,screen height()/2,1
offset sprite 1,sprite width(1)/2,sprite height(1)/2
for i=0 to 180
sprite 1,4*cos(i)+sprite x(1),4*sin(i)+sprite y(1),1
print i
wait 50
next i
Sure enough the sprite sweeps from 12 oclock to 6 oclock
But if I use the following...
sprite 1,screen width()/2,screen height()/2,1
offset sprite 1,sprite width(1)/2,sprite height(1)/2
for i=180 to 0 step -1
sprite 1,4*cos(i)+sprite x(1),4*sin(i)+sprite y(1),1
print i
wait 50
next i
The sprite sweeps from 12 oclock to 6 oclock, but this time in a counter-clockwise direction. I would have thought it should have gone from 6oclock to 12 oclock!!!
Likewise, how on earth would I be able to go from 6oclock to 3oclock in a clockwise direction (because at 12oclock, the degree would reset to 0), or from 6 oclock to 9oclock in a counterclockwise direction...!!!!
I've noticed in the manual there are some commands which are...
CurveValue
WrapValue
NewXValue
NewYValue
NewZValue
CurveAngle
But I'm affraid the documentation is, er, not too good.
So, what am I doing wrong (obviously it's me not understanding mathematics), and can the same effect be achieved using the above poorly-documentated commands.
MANY thanks...
-----
~ J ~