->getAbsoluteRotation()

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
TheC
Posts: 93
Joined: Fri May 05, 2006 7:50 am

->getAbsoluteRotation()

Post 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
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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));
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply