(1)Transform.eulerAngles 欧拉角
官方解释是:
The rotation as Euler angles in degrees.
The x, y, and z angles represent a rotation z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis.
Only use this variable to read and set the angles to absolute values. Don't increment them, as it will fail when the angle exceeds 360 degrees. Use Transform.Rotate instead.
表示沿xyz方向旋转的角度。
(2)Quaternion.AngleAxis
public static Quaternion AngleAxis(float angle, Vector3 axis);
其中参数angle为旋转角;参数axis为轴向量。
官方描述:Creates a rotation which rotates angle
degrees around axis
.
按照角度和轴向量创建一个旋转。
(3)Quaternion.ToAngleAxis
public void ToAngleAxis(out float angle, out Vector3 axis);
其中参数angle为旋转角;参数axis为轴向量。
官方描述:Converts a rotation to angle-axis representation (angles in degrees).
功能说明:此方法用于将Quaternion实例转换为角轴表示。在transform. rotation.ToAngleAxis(out angle, out axis)中输出值angle和axis的含义为:要将GameObject对象的rotation从Quaternion.Identity状态变换到当前状态,只需要将GameObject对象绕着axis的轴向(指世界坐标系中)旋转angle角度即可。
提示:此方法通常和静态方法AngleAxis (angle: float, axis : Vector3)联合使用,使得一个物体的rotation始终和另一个物体的rotation保持一致。
(4)Vector3.magnitude
描述:The length of the vector is square root of (x*x+y*y+z*z)
. 向量的模。
(5)Unity四元数和向量相乘作用及其运算规则
效果:
作用:四元数和向量相乘表示这个向量按照这个四元数进行旋转之后得到的新的向量。
比如:向量vector3(0,0,10),绕着Y轴旋转90度,得到新的向量是vector3(10,0,0)。
在unity中表示为: