阅读背景:

如何使用四元数围绕点旋转对象?

来源:互联网 

In my 3D application I store object's position in a vector and it's rotation around the origin in a quaternion. I need to rotate the object around a vector with an arbitrary origin. I tried converting the position - vectorOrigin and the rotation into a matrix, rotating the matrix and then extracting the position and rotation as a vector and a quaternion from the resulting matrix. The position comes up ok, but the rotation remains constant (the object rotates around the given vector but it always faces in the same direction).In my 3D application I store object's position




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: