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 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/
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
88 People are following this question.
Get Direction from 2 Vectors - and Apply to Transform
Set rotation based on 1,1,1 style vector? How to convert vector3 to quaternion?
Rotate Vector3 partially towards another Vector3
Trouble with Vector3.Angle() and RotateAround()
0-360 Y degree from Vector3.Angle