Discuss Scratch

-effortIess-
Scratcher
100+ posts

How to Make an Object Orbit a Point?

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.


Support the suggestion HERE by adding this button to your signature

BAN PI DAY!!! (joke)

100th post
Malicondi
Scratcher
1000+ posts

How to Make an Object Orbit a Point?

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 ”

post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.

coming soon :)


-effortIess-
Scratcher
100+ posts

How to Make an Object Orbit a Point?

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…


Support the suggestion HERE by adding this button to your signature

BAN PI DAY!!! (joke)

100th post

Powered by DjangoBB