https://docs.unity3d.com/Documentation/ScriptReference/Quaternion.html
Quaternion
Description
Quaternions are used to represent rotations.
They are compact, don't suffer from gimbal lock and can easily be interpolated. Unity internally uses Quaternions to represent all rotations.
Tthey are based on complex numbers and are not easy to understand intuitively. You almost never access or modify individual Quaternion components (x,y,z,w); most often you would just take existing rotations (e.g. from the
Transform) and use them to construct new rotations (e.g. to smoothly interpolate between two rotations). The Quaternion functions that you use 99% of the time are: Quaternion.LookRotation, Quaternion.Angle, Quaternion.Euler, Quaternion.Slerp, Quaternion.FromToRotation, and Quaternion.identity. (The other functions are only for exotic uses.)
You can use the Quaternion.operator * to rotate one rotation by another, or to rotate a vector by a rotation.
四元数
命名空间:UnityEngine
四元数是紧凑的,不受万向节锁限制,并且可以很容易的被线性插值(平滑动作)。Unity在内部使用四元数来表示所有的旋转、
四元数基于复数,并且不容易被直接的理解。你几乎不用访问或单独的修改四元数成分(x,y,z,w)。大多数是使用现有的旋转,使用它们来构造一些新的旋转。99%情况下你所使用的Quaternion函数有:
Quaternion.LookRotation, Quaternion.Angle, Quaternion.Euler, Quaternion.Slerp, Quaternion.FromToRotation, 和Quaternion.identity。