object3D.setTranslationMatrix & setRotationMatrix

Started by rainfalls, November 03, 2013, 04:55:27 PM

Previous topic - Next topic

rainfalls

If the parameter matrix contains both rotation and translation values, it appears that setTranslationMatrix won't apply the rotation to the object but setRotationMatrix will also apply the translation to the object.

I'm not sure if the behavier of setRotationMatrix can be called a bug but I had been stuck here for quite some time before I found this.

EgonOlsen

Yes, your observations are correct. The different behaviour is caused by the internal implementation. You are not supposed to feed other matrices than pure rotation matrices into setRotationMatrix() but the engine doesn't enforce it. Some people are (ab)using this behaviour for special purposes.