I got a bit of a problem whit those animators. Trying to use them to do the work instead of doing it myself. I wish i knew math better.
In my current game project. A model needs to rotate 45 degrees in one second. (turn left or right, depends on what happens). So i started to do this in the constructor in a class that controls and contains a model:
Code: Select all
turnLeftAnim = smgr->createRotationAnimator( core::vector3df(0,-45,0) );
turnRightAnim = smgr->createRotationAnimator( core::vector3df(0,45,0) );
Code: Select all
node->addAnimator( turnLeftAnim );Also. I run this when a second has passed:
Code: Select all
node->removeAnimator( turnLeftAnim );
node->removeAnimator( turnRightAnim );
But nothing happends.
It does however stop if i call removeAnimators(). But the model also have collision, and i want it to keep that.
So, to sum it all up,
* How come it doesn't rotate 45 degreees in one second?
* Why does it not stop?
Thankful for any help, ideas and suggestions.