- Home /
How do I find the angle between the players forward vector and the mouse position?
I'm trying to find the angle between where my player is facing and where my mouse is pointing.
If the mouse points in front of my character the angle should be 0. If it points behind the player is should be 180 or -180. To the right or left of the player it should be 90 or -90.
So in all, the angle needs to be relative to where the player is facing.
Answer by elforama · Apr 15, 2017 at 05:10 PM
I was able to come across the answer with more searching. Here it is: https://forum.unity3d.com/threads/finding-the-angle-between-a-direction-and-a-point.30639/
Your answer
Follow this Question
Related Questions
Get Direction from 2 Vectors - and Apply to Transform 0 Answers
Trouble with Vector3.Angle() and RotateAround() 1 Answer
Calculate third Vector3 with two Vector3s and an Angle 1 Answer
0-360 Y degree from Vector3.Angle 1 Answer
How do you calculate the rotation of a hexagon based on the six Vector3 points 0 Answers