Hi, I’d like to grab the facing angle of my unit object.
Let me illustrate:
Given the position of the blue character and the pink dot, I want to call some kind of function that will return 45.
Similarly, if the pink dot were placed below the blue character, I want the function to return 270. Et cetera for 180, 0, and 90 and all angles in between.
For context, I’m designing a mouse-movement system for my top-down game. I want to be able to access the ‘facing’ of the unit to determine what sprite/animation I should play. For example, if the unit is facing left, I want to play the ‘left’ animation.