CQ_Intelligent-Technology-T.../Assets/Improt/UTS/Scripts/Another Script/CarWheelsRotation.cs

9 lines
251 B
C#

using UnityEngine;
public static class CarWheelsRotation
{
public static float AngleSigned(Vector3 v1, Vector3 v2, Vector3 n)
{
return Mathf.Atan2(Vector3.Dot(n, Vector3.Cross(v1, v2)), Vector3.Dot(v1, v2)) * Mathf.Rad2Deg;
}
}