Hi...
Looking for a bit of help/suggestions from the math guys
I need to work out the formula/logic for working out the direction an enemy actor is facing, in relation to the direction the player actor is facing. (diagram attached)
In the diagram, theres 3 examples. Ive shown the rough directions everything is facing, and the rough direction that the enemy is located at compared to the player.
Ive added what I think (rough visual estimate) the direction the enemy is facing in relation to the direction the player is facing in the light grey text, based on the premise that if the player is looking directly at the enemy, and the enemy is facing/moving (towards the player 270), (away 90), (to the Left 180), (to Right 0).
Im using the data from the actors on an overhead map to generate the positions and rotations of actors in a mock 3D viewport, so need to work it out so I can get the actors in the viewport to generate the correct image for the objects rotation.
So Im trying to work out the math/formula/logic to give me the Figure in grey.... if any of that makes sense
Any help/suggestions would be appreciated... cheers