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

**Posts:**3,106**Reputation:**27,618

B

110
S

30
G

28
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,338**Reputation:**21,122

B

98
S

21
G

16
**Posts:**3,106**Reputation:**27,618

B

110
S

30
G

28
**Posts:**69**Reputation:**1,821

B

21
S

2
G

2
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:**868

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:**26,512

B

62
S

31
G

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

## Who is online |

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