12 posts
• Page **1** of **2** • **1**, 2

**Posts:**3,045**Reputation:**20,989

B

87
S

21
G

18
You can do a math.

How to do:

create instance radians = 0;

create instance degrees= 0;

create instance radius = 100; // random radius

initial.x = 50; // random primary x position

initial.y = 50; // random primary y position

Every Thick

degrees = degrees + 5; // each time degrees is increased by 5 degrees

radians = degrees * Math.PI/ 180;

sprite.y = initial.y + Math.sin(radians) * radius // because sin A = y/r

sprite.x = initial.x + Math.cos(radians) * radius // because cos A = x/r

How to do:

create instance radians = 0;

create instance degrees= 0;

create instance radius = 100; // random radius

initial.x = 50; // random primary x position

initial.y = 50; // random primary y position

Every Thick

degrees = degrees + 5; // each time degrees is increased by 5 degrees

radians = degrees * Math.PI/ 180;

sprite.y = initial.y + Math.sin(radians) * radius // because sin A = y/r

sprite.x = initial.x + Math.cos(radians) * radius // because cos A = x/r

**Posts:**1,166**Reputation:**18,090

B

92
S

18
G

12
**Posts:**3,045**Reputation:**20,989

B

87
S

21
G

18
**Posts:**61**Reputation:**1,680

B

19
S

2
G

1
TELLES0808 wrote:You can do a math.

How to do:

create instance radians = 0;

create instance degrees= 0;

create instance radius = 100; // random radius

initial.x = 50; // random primary x position

initial.y = 50; // random primary y position

Every Thick

degrees = degrees + 5; // each time degrees is increased by 5 degrees

radians = degrees * Math.PI/ 180;

sprite.y = initial.y + Math.sin(radians) * radius // because sin A = y/r

sprite.x = initial.x + Math.cos(radians) * radius // because cos A = x/r

I've been struggling to get this circular movement right, and finally your solution worked best for me..Thanks a lot.

**Posts:**40**Reputation:**863

B

8
S

1
@nanag32 - try subtracting dt rather adding dt to t.

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/

**Posts:**1,194**Reputation:**23,767

B

59
S

30
G

34
12 posts
• Page **1** of **2** • **1**, 2

## Who is online |

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