Get euler rotation from Quaternion?

∥☆過路亽.° 提交于 2019-12-14 00:16:43

问题


I'm using FlyControls for moving and rotation my plane (I'm doing a flight sim), and it works pretty well. However now I have ran into a problem where one possible solution would be to know the euler angles of my plane. Unfortunately FlyControls is using Quaternion. Is there a possible way to get the angles somehow? Of course, I could rewrite the FlyControls module to use euler angles. But I would like to avoid that if possible.


回答1:


var rotation = new THREE.Euler().setFromQuaternion( quaternion, eulerOrder );

three.js r.69



来源:https://stackoverflow.com/questions/12784807/get-euler-rotation-from-quaternion

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!