Answers for "check the angle between two game objects unity"

C#
0

check the angle between two game objects unity

Vector3 dir = GameObject1.position - GameObject2.position;
 float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg;
Posted by: Guest on July-27-2020

Code answers related to "check the angle between two game objects unity"

C# Answers by Framework

Browse Popular Code Answers by Language