How to Make an Object Orbit a Point?

id: 750259

category: Help with Scripts

posts: 3

Yeah it’s in the title. Basically, I want “spawners” in my game to circle around a point. I know there’s trig for this I just always forget it.
Malicondi Malicondi loading
Fear no more, you can no longer forget
define rotate around point: (x) (y) speed: (s) radius (r)
change [dir v] by (s)
go to x: ((x) + (([sin v] of (dir)) * (r))) y: ((y) + (([cos v] of (dir)) * (r)))
You can use this block like this:
forever
rotate around point: (0) (0) speed: (5) radius (50) :: custom
Hope this helps! this post took forever to make because of “ unsuitable language ”

Malicondi wrote:

Fear no more, you can no longer forget
define rotate around point: (x) (y) speed: (s) radius (r)
change [dir v] by (s)
go to x: ((x) + (([sin v] of (dir)) * (r))) y: ((y) + (([cos v] of (dir)) * (r)))
You can use this block like this:
forever
rotate around point: (0) (0) speed: (5) radius (50) :: custom
Hope this helps! this post took forever to make because of “ unsuitable language ”

Ah thank you so much!
No I didn’t fail trig…