Legacy GM turn object1 around object2, fixed to object 2's surface



How can i make an object turn around another object with the same speed as the surface of said object is moving (like a tree on a planet turns fixed on the surface/outer radius on the planet with the planet). I can turn the planet/circle without problem (image_angle), but i have problems synchronizing turnrate and position of the "tree" (object i want to turn together with the planet/circle). help would be greatly appreciated.

visualization: https://imgur.com/URZTvxy


You could change the centre point of the tree to be the same as that of the planet, then the angles will be the same, with no x and y offset required.
Otherwise, you'll need to use sin() and cos() to calculate the position based on the angle of the planet, and apply the calculated x and y offsets. Just remember sin and cos use radians, but image_angle is degrees.