- Home /
Get the angle from one object to another.
Hi guys.
Im not sure how to say this correctly, but this is what i want pretty much:
How to find Angle1 and Angle2? Everything i found around the forums was about angle between vectors which i dont need in my case. Its a 3D game, so i guess i should find angles horizontal and vertical... Any clues?
Thanks. Arnold out.
Angle1 and Angle2 relative to what perspective? That is you have a 2D diagram, but if you consider that player and object can be an an arbitrary angles and have arbitrary surfaces that have arbitrary angles, there are an infinite number of Angle1s and Angles2s as you spin around the the line between the two.
While I could make some guesses, you really need to know another property or two about the two objects. What properties will depend on the reason for solving this problem.
Hi,
Try Vector3.Angle(); go in the doc. You can use Debug.DrawRay(); and Debug.DrawLine() to see you'r vector in your scene.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
destroying object upon collision 1 Answer
Boat script problems when changing platform to android 0 Answers
Have a 'Torch' script toggle on and off 1 Answer
Simple Timer 2 Answers