I'm trying out some animation with the ninja.b3d model provided in the Irrlicht tutorials, and switching between the different animations works. However, I read the wiki on how to use the new animation system and it said I should call setTransitionTime to smoothly go from one animation to another, but when I call this method with any value, the model simply stops moving. There's not a lot of context in the wiki, so I suspect I'm calling it in the wrong place/wrong way, but the variations I've tried haven't worked either. This is what it's like now:
Code: Select all
void Player::OnAnimationEnd(IAnimatedMeshSceneNode* node){
if(attack){
model->setTransitionTime (1);
model->setFrameLoop(0, 13);
model->setAnimationSpeed(15);
model->setLoopMode(true);
model->animateJoints();
attack = false;
}
}
(attack is set to true when a key is pressed, it starts the attack animation. When that stops, this is called.)