QQuaternion convert euler angle to quaternion not work
Solved
General and Desktop
-
below is my code:
QQuaternion quat; quat.fromEulerAngles(0, 0, thea); orix = quat.toVector4D().x(); oriy = quat.toVector4D().y(); oriz = quat.toVector4D().z(); oriw = quat.toVector4D().w();
every time when i change thea , orix-oriw never changes, i wonder weather this is a bug? my qt version is 5.15.2.
and when i test my data on https://quaternions.online/,it has no problem.
-
Hi,
@WuYaZi said in QQuaternion convert euler angle to quaternion not work:
QQuaternion quat;
quat.fromEulerAngles(0, 0, thea);There's no bug. You're not using the method correctly. It's a static method.
QQuaternion quat = QQuaternion::fromEulerAngles(0, 0, thea);
-