I've been trying to make multiple objects rotate around another object. In the game I'm designing, the player is in the middle and enemies randomly spawn off screen and hover toward the player.
I've tried following this tutorial (http://www.scirra.com/forum/how-do-i-make-earth-rotate-around-the-sun_topic45633.html) but I'm having trouble getting it to work with multiple objects. With a single object the example works perfectly, but it runs into some issues when you add more objects. For example, if you add 3 more circles in the example then they will all overlap and it appears there is only one circle.
I've tried adding "For Each" into the condition, which allows there you to see multiple objects, but it aligns all the objects in a single line according to their distance. I've tried storing their distance values in an instance variable, so that each object would have it's own unique value, but you cannot use instance variables when setting the position. I've been wracking my brain over this for a while, but I just can't think of a way to have multiple objects slowly circle a single object.