I am making an overhead-view game with WASD movement controls and mouse aiming controls.
I have made a player and a hitbox for the player, and whenever the hitbox isn't touching a wall the game is supposed to remember the player's x&y position along with the direction of the player so that when the hitbox overlaps a wall, the player moves back to the said saved x&y position and rotates back to the saved rotation. However, I see no option to retrieve the player's rotation, which causes problems because the hitbox changes depending on the direction of the player.
So in short, how to I retrieve the direction of the player?
Thanks.