Page 1 of 1

Rotation in degrees

Posted: Sat Dec 23, 2006 7:10 pm
by Methuselah
The getRotation() function returns a vector3df.
How can I get the rotation in degrees (radians is fine too)?

Posted: Sat Dec 23, 2006 7:24 pm
by vitek
It is not well documented, but ISceneNode::getRotation() returns the rotation of the node relative to its parent in degrees as a vector. The X component of the vector is the rotation about the X axis. Same for Y and Z.

If you want the nodes absolute rotation, ask it absolute transformation matrix for the rotation. node->getAbsoluteTransofrmation().getRotationDegrees().

Travis

Posted: Sun Dec 24, 2006 8:24 pm
by arras
also note that rotation in Irrlicht is in Euler angles. Without understanding howe these works you gona have hard time rotating anything in Irrlicht way you want.