quaternion.toEuler() or matrix4.setRotationDegrees() wrong

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
hankersyan
Posts: 7
Joined: Sun Dec 13, 2009 1:54 am

quaternion.toEuler() or matrix4.setRotationDegrees() wrong

Post by hankersyan »

vector3df v4;
quaternion q1;
q1.fromAngleAxis(65.25f*DEGTORAD, vector3df(1, 0, 0));
q1.toEuler(v4);

vector3df v5;
matrix4 mx4;
mx4.setRotationDegrees(vector3df(65.25f,0,0));
quaternion q2(mx4);
q2.toEuler(v5);

v4*RADTODEG is 65.249992,-0.000000,0.000000
v4 is right, BUT v5 get a wrong sign.
v5*RADTODEG is -65.249992,-0.000000,0.000000

WHY? i work on Irrlicht 1.6
Thanks!
Adversus
Posts: 128
Joined: Sun Oct 05, 2008 10:58 pm
Contact:

Re: quaternion.toEuler() or matrix4.setRotationDegrees() wro

Post by Adversus »

Does anyone have a solution to this? I'm finding the same issue.
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: quaternion.toEuler() or matrix4.setRotationDegrees() wro

Post by CuteAlien »

This was fixed in 1.8.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply