Rotation in degrees

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Methuselah
Posts: 19
Joined: Fri Nov 24, 2006 9:33 am

Rotation in degrees

Post by Methuselah »

The getRotation() function returns a vector3df.
How can I get the rotation in degrees (radians is fine too)?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post 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.
Post Reply