UnityEngine.Quaternion.LookRotationToQuaternion(UnityEngine.Vector3, UnityEngine.Vector3, out UnityEngine.Quaternion)

Here are the examples of the csharp api UnityEngine.Quaternion.LookRotationToQuaternion(UnityEngine.Vector3, UnityEngine.Vector3, out UnityEngine.Quaternion) 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 : focus-creative-games

public static Quaternion LookRotation(Vector3 viewVec, Vector3 upVec)
        {
            Quaternion q;
            bool ret = LookRotationToQuaternion(viewVec, upVec, out q);
            if (!ret)
            {
                throw new Exception("Look fail!");
            }

            return q;
        }