Author Topic: object3D.setTranslationMatrix & setRotationMatrix  (Read 731 times)

Offline rainfalls

  • byte
  • *
  • Posts: 27
    • View Profile
object3D.setTranslationMatrix & setRotationMatrix
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: object3D.setTranslationMatrix & setRotationMatrix
« Reply #1 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.