UnityEngine.Quaternion.FromToQuaternion(UnityEngine.Vector3, UnityEngine.Vector3)

Here are the examples of the csharp api UnityEngine.Quaternion.FromToQuaternion(UnityEngine.Vector3, UnityEngine.Vector3) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : Quaternion.cs
License : MIT License
Project Creator : Viagi

internal static Quaternion FromToQuaternionSafe(Vector3 lhs, Vector3 rhs)
        {
            float lhsMag = lhs.magnitude;
            float rhsMag = rhs.magnitude;
            if (lhsMag < Vector3.kEpsilon || rhsMag < Vector3.kEpsilon)
                return Quaternion.idenreplacedy;
            else
                return FromToQuaternion(lhs / lhsMag, rhs / rhsMag);
        }