Page 1 of 1

->getAbsoluteRotation()

Posted: Mon Nov 27, 2006 9:52 pm
by TheC
This command doesn't exist, so I've been trying to re-create it by extracting the angles from the parents AbsoluteTransformation matrix and somehow combining them with the childs local rotation.

The Matrix methods have ntohing to rotate a rotation vector. So I am kind of stuck at this point.

Thanks,
TC

Posted: Mon Nov 27, 2006 11:44 pm
by Acki
Have a look at the docu and you'll see how to get the absolute rotation:

Code: Select all

matrix4 mat = node->getAbsoluteTransformation ();
vector3df rot = mat.getRotationDegrees();
and you also can set the rotation:

Code: Select all

matrix4 mat = node->getAbsoluteTransformation ();
mat.setRotationDegrees(vector3df(x, y, z));