Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将对象的方向存储为单位四元数,我想查看对象的局部 x 轴与全局 y 轴的角度。最简单的方法是什么?
谢谢!
我想多了...将向量(1,0,0),局部x轴旋转到全局框架中。用全局 y 向量点它,并取它的 arcCos。因为我不在乎物体是颠倒的,所以我拿了
acos(abs(rotateVector(myQuat, vector(1, 0, 0)), upVector))