Bug #1: I've noticed that setting rotation via setRotationDegrees() causes scale to be changed too.
Bug #2: Also the order of what you do fist: set rotation or set scale - does matter.
Next test case shows this problem:
Code: Select all
core::matrix4 m;
m.setTranslation(core::vector3df(-5210, -582, -9738));
m.setRotationDegrees(core::vector3df(124, 352, 8));
m.setScale(1.1f);
// NOW: m[0] == m[5] == m[10] == 1.1f
core::vector3df v = m.getScale();
// NOW: v == X=1.1173017 Y=1.3730689 Z=1.3796232
Code: Select all
core::matrix4 m;
m.setTranslation(core::vector3df(-5210, -582, -9738));
m.setScale(1.1f);
// NOW: m[0] == m[5] == m[10] == 1.1f
m.setRotationDegrees(core::vector3df(124, 352, 8));
// NOW: m[0] == 0.98063082, m[5] == -0.56980854, m[10] == -0.55375081
core::vector3df v = m.getScale();
// NOW: v == X=0.99999994 Y=0.99999994 Z=0.99999994 // this is 1.0 (but not 1.1)