hello.

I'm trying to orbit sprite "c" around two other objects sprite "A" and "B". Both A and B will be moving slowly.

I'm lost on getting this to work. Help or links if this has already been answered are appreciated

5 posts
• Page **1** of **1**

therefore u need that parametric view of your circle:

(r*cos(t)+x0,r*sin(t)+y0)

else you need the distance/2 between A and B, the "rotation point". at the start of ellipse events, there must be

xk=r*cos(t0)+x0

yk=r*sin(t0)+y0

if this is correct u need

tan(startAngle)=sin(t0)/cos(t0)

for the following frames.

when u got this, the new point of C is

x= radius*cos(endAngle)

y= radius*sin(endAngle)

If u speak german, this might help you:

http://www.uni-protokolle.de/foren/viewt/45551,0.html

for instance:

t0=10°=Pi/18

t1=120°=2/3*Pi

(1,2)=(2*cos(t0)+x0; 2*sin(t0)+y0)

x0=1-2*cos(Pi/18 )=-0,969615506

y0=2-2*sin(Pi/18 )=1,652703645

target point:

xk=-1,969615506

yk=3,384754453xeed 2011-07-24 18:24:07

(r*cos(t)+x0,r*sin(t)+y0)

else you need the distance/2 between A and B, the "rotation point". at the start of ellipse events, there must be

xk=r*cos(t0)+x0

yk=r*sin(t0)+y0

if this is correct u need

tan(startAngle)=sin(t0)/cos(t0)

for the following frames.

when u got this, the new point of C is

x= radius*cos(endAngle)

y= radius*sin(endAngle)

If u speak german, this might help you:

http://www.uni-protokolle.de/foren/viewt/45551,0.html

for instance:

t0=10°=Pi/18

t1=120°=2/3*Pi

(1,2)=(2*cos(t0)+x0; 2*sin(t0)+y0)

x0=1-2*cos(Pi/18 )=-0,969615506

y0=2-2*sin(Pi/18 )=1,652703645

target point:

xk=-1,969615506

yk=3,384754453

**Posts:**396**Reputation:**4,977

B

15
S

3
G

5
5 posts
• Page **1** of **1**

## Who is online |

Users browsing this forum: No registered users and 9 guests |