How to make Node absolute rotation?

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
Barts_706
Posts: 26
Joined: Tue Nov 01, 2005 1:20 am

How to make Node absolute rotation?

Post by Barts_706 »

I would like to have my node rotated in absolute coordinates but when I use

Node -> setRotation(some_vector)

then it is rotated only in relative coordinates. I checked API, but haven't found any appropriate funciton hence the question.
Xaron
Posts: 310
Joined: Sun Oct 16, 2005 7:39 am
Location: Germany
Contact:

Post by Xaron »

So you want to rotate the node around the center (0,0,0) of your world?

Regards - Xaron
FrSl
Posts: 19
Joined: Thu Jan 19, 2006 5:03 pm

Post by FrSl »

If you want to rotate the node using it's own old coordinates:

Code: Select all

core::vector3df addRotation = core::vector3df(0.1,0.1,0.1);
node->setRotation(node->getRotation() + addRotation);
If you want to rotate the node without looking at it's current rotation use:

Code: Select all

node->setRotation( core::vector3df(0.1,0.1,0.1) );
Did you mean this? :)

FrSl
Post Reply