Matrix rotation wrong orientation LibGDX
- by glz
I'm having a problem with matrix rotation in libgdx. I rotate it using the method matrix.rotate(Vector3 axis, float angle) but the rotation happens in the model orientation and I need it happens in the world orientation.
For example:
on create() method:
matrix.rotate(new Vector3(0,0,1), 45);
That is ok, but after:
on render() method:
matrix.rotate(new Vector3(0,1,0), 1);
I need it rotate in world axis.