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

**Posts:**3,139**Reputation:**28,426

B

99
S

35
G

29
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,385**Reputation:**22,903

B

109
S

24
G

18
**Posts:**3,139**Reputation:**28,426

B

99
S

35
G

29
**Posts:**76**Reputation:**1,860

B

22
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:**30,902

B

64
S

34
G

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

## Who is online |

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