# Help w/ circular rotation

4 replies to this topic

### #1 Mr.Troid

Mr.Troid

GMC Member

• New Member
• 114 posts

Posted 25 December 2011 - 04:21 AM

I am not good at math. So, I would really appreciate it if someone could help me to freely maneuver an object in an 'infinity symbol' trajectory.
• 0

### #2 wakeskater_X

wakeskater_X

GMC Member

• GMC Member
• 448 posts

Posted 25 December 2011 - 05:01 AM

you can use paths, they are in the game and let you edit custom pathing for an object.

Just draw one out in an infinity symbol
• 0

### #3 Mr.Troid

Mr.Troid

GMC Member

• New Member
• 114 posts

Posted 26 December 2011 - 01:16 AM

I know but I don't want to have to go to paths every time I want to do A.I.
• 0

### #4 xshortguy

xshortguy

GMC Member

• Global Moderators
• 4186 posts
• Version:GM:Studio

Posted 26 December 2011 - 02:10 AM

```r = sqr( lengthdir_x( maximum_distance_from_center, angle ) )
x = lengthdir_x(r, angle)
y = lengthdir_y(r, angle)```

Also,
http://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli

Use the parametrized form.
• 0

### #5 Mr.Troid

Mr.Troid

GMC Member

• New Member
• 114 posts

Posted 26 December 2011 - 10:06 PM

Thank you for the reference. But, when I put the object in the room it goes to upper left corner. What am I doing wrong?

```//Create event
maximum_distance_from_center = 2
angle = 16

//Step event
r = sqr( lengthdir_x( maximum_distance_from_center, angle ) )
x = lengthdir_x(r, angle)
y = lengthdir_y(r, angle)
```

• 0

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users