addAnimator() resets the rotation of a node to 0,0,0

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
holgerkl

addAnimator() resets the rotation of a node to 0,0,0

Post by holgerkl »

Hello,

am I right, that an addAnimator() resets the rotation of a node to 0,0,0, or is it my fault? I suppose that isn't the way it should work.

What i am trying to do is:
Click on a node (a door), add an animator which does the rotation (open door). After a specific amount of rotation (door is open), remove the animator.
This works so far.
Then on a second click, add a new animator with a reversed rotation (close door). This breaks, because after adding this second animator (the first animator is already removed), the rotation of the node is 0,0,0. This resetting of the node's rotation doesn't happen immediately, but after the next beginScene() or DrawAll().

Best Regards,
Holger
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

Only rotation animator does that, not all of them. That reminds me, that i planned to fix it :) Well, time to get to work. Stay tune.
Tomasz Nowakowski
Openoko - www.openoko.pl
holgerkl

Post by holgerkl »

Well, that was a fast response :wink:
That are good news, because a work around would have made my code look ugly :)
I will be stay tuned and leave my door closing immediately, at least the opening works smooth.

Thanks,
Holger
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

Tomasz Nowakowski
Openoko - www.openoko.pl
holgerkl

Post by holgerkl »

Thanks!

Will this bugfix be included in a subsequent Irrlicht update, because i didn't want to change the source code of the irrlcht engine before 1.0.

Also the 180+x MB download of the directx9 SDK download is too much for my 28.8 baud modem, in order to build the Irrlicht.[lib|dll].
warui
Posts: 232
Joined: Wed Apr 14, 2004 12:06 pm
Location: Lodz, Poland
Contact:

Post by warui »

> Will this bugfix be included in a subsequent Irrlicht update

I don't know. Ask Niko, he's the boss ;)

> because i didn't want to change the source code of the irrlcht engine before 1.0.

You can just add CSceneNodeAnimatorRotation.h and CSceneNodeAnimatorRotation.cpp to your project. Change class name to something else to avoid problems. It should work.
Tomasz Nowakowski
Openoko - www.openoko.pl
Post Reply