四元数乘以向量(欧拉角)的意义

Quaternion.Euler()的意义是
Returns a rotation that rotates z degrees around the z axis, x degrees around the x axis, and y degrees around the y axis.
也就是说绕x轴旋转x度,y轴旋转y度,z轴旋转z度

Quaternion作用于Vector3的右乘操作(*)返回一个将向量做旋转操作后的向量,也就是说是将一个向量(欧拉角)旋转到指定的角度

例如:Quaternion.Euler(0, 90, 0) * Vector3(0.0, 0.0, -10.0)表示将向量Vector3(0.0, 0.0, -10.0)做绕y轴90度旋转后的结果,等于Vector3(-10.0, 0.0, 0.0).

猜你喜欢

转载自blog.csdn.net/Marccco/article/details/87893550
今日推荐