for example:
Code: Select all
irr::core::matrix4 m;
m.setRotationDegrees(irr::core::vector3df(0.f, 180.0f, 0.f));
irr::core::vector3df result = m.getRotationDegrees();
cout << result.X << ", " << result.Y << ", " << result.Z << endl;
Looking at the changes to matrix4.h, it looks like there is now code to handle matrix scaling. So in getRotationDegrees() rotx & roty can possibly be calculated incorrectly because the scale vector's negative values will cancel out the negative values in the matrix.
The comments for matrix4::getScale() says it returns absolute values, but it does not.
I don't know if the bug is that getScale() shouldn't be returning negative elements, or that the getRotationDegrees() function needs to take the absolute value of the scale. I tried the latter, and it fixed my rotation issue.