jPCT - a 3d engine for Java => Support => Topic started by: rainfalls on November 03, 2013, 04:55:27 pm

Title: object3D.setTranslationMatrix & setRotationMatrix
Post by: rainfalls on November 03, 2013, 04:55:27 pm
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.
Title: Re: object3D.setTranslationMatrix & setRotationMatrix
Post by: EgonOlsen on November 03, 2013, 06:45:15 pm
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.