You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that the Matrix3D class (jiglib/maths/matrix3d.js) possibly has a bug in the appendRotation() and angleAxis() functions. The conversion from degrees to angles is done with angle=angle/(pi_2), whereas it should be angle=angle_pi/180 (or angle_2_pi/360). I am also wondering why in the appendRotation() function you negate the axis of rotation (Vector3DUtil.negate(axis)).
If, for example, I set the rotation angles [10, 20, 30] of an object and I apply inverse transformations to the orientation matrix I get the rotation angles [350, 340, 330](with degrees/radians conversion fixed). If I comment the axis negation part I get the right values ([10, 20, 30]).
Regards,
Gabriel
The text was updated successfully, but these errors were encountered:
Good spots, I'm not sure why it's that way I'll do some investigation not sure where the code came from initially. Although, the conversion one would certainly explain some funky behaviour I've seen. I know many of the functions in the maths part aren't used by jiglib which maybe how they've gone unnoticed.
Hi,
I've noticed that the Matrix3D class (jiglib/maths/matrix3d.js) possibly has a bug in the appendRotation() and angleAxis() functions. The conversion from degrees to angles is done with angle=angle/(pi_2), whereas it should be angle=angle_pi/180 (or angle_2_pi/360). I am also wondering why in the appendRotation() function you negate the axis of rotation (Vector3DUtil.negate(axis)).
If, for example, I set the rotation angles [10, 20, 30] of an object and I apply inverse transformations to the orientation matrix I get the rotation angles [350, 340, 330](with degrees/radians conversion fixed). If I comment the axis negation part I get the right values ([10, 20, 30]).
Regards,
Gabriel
The text was updated successfully, but these errors were encountered: