Legacy GM How to position an object in the circular 'orbit' of another object?

M

myoventea

Guest
I have a target object which is moving slowly - i'd like to create another 'pointer' object that will maintain a set distance from the target, will always point towards the target, and will move in a circle around the target when the player moves the mouse left/right.

I've only the barest idea of how to do this in GML - could someone give me some help?

Thanks all!
 

NightFrost

Member
For orbiting object, you can use code in this post. Facing the target is the matter of setting image_angle to the opposite of orbital angle (180 degree difference).
 
Top