I want to create a game that involves multiple objects orbiting a planet.
I searched through the forum and found out how to get my meteor to orbit.
Basically it was X + radius * cos(period) , Y + radius *sin(period).
Using For Each to have multiple meteors results in them being lined up perfectly. I tried adding a random number and got their orbits to be larger, but I can't figure out how to keep them from being perfectly lined up. Well, short of making multiple objects for each meteor.
Does this make sense? Could anyone point me in the right direction?
Here is my capx: Orbit Test Capx
Thanks for any help!
Just replace all the constants with instance variables and set them differently.
Edit: fixed 360 wrap-around
Develop games in your browser. Powerful, performant & highly capable.
I love you.