I'm trying to rotate a planet around the center of the room and I'm sure this is a much easier calculation than I am thinking it will be.
Pressing the Up key will move the object in the opposite direction the player is facing, like this:
Pressing the Left and Right keys will change the direction of the player and rotate the object around the player like this:
I want to figure out the calculations for the X and Y variables for the object.
I was thinking like this:
However that works for the X and Y but not the rotation factor.
x = room_width/2 - (obj_player.x-xstart);
y = room_height/2 - (obj_player.y-ystart);
Any ideas? Thanks