Code: Select all
if( torsoNode )
{
f32 frameNumber = torsoNode->getFrameNr();
if( frameNumber < 1 || frameNumber > 25)
frameNumber = 1;
torsoNode->setFrameLoop( 1, 25 );
torsoNode->setAnimationSpeed( 5 );
torsoNode->setLoopMode( true );
torsoNode->setCurrentFrame( frameNumber );
printf("\nCurrent Frame: %f\nAnimation speed: %f\n", (float)torsoNode->getFrameNr(),
(float)torsoNode->getAnimationSpeed() );
}
I'm sorry if this has been asked before - I searched for a solution on the forums but found none.