如果自己设置骨骼/mesh目录,还要手动修改resources.cfg文件,将骨骼/mesh目录添加进去,否则程序会崩溃
02 | Animation::setDefaultInterpolationMode(Animation::IM_LINEAR); |
03 | Animation::setDefaultRotationInterpolationMode(Animation::RIM_LINEAR); |
06 | Ogre::Entity* ent = m_pRenderBox->getEntity(name); |
08 | ent->getSkeleton()->addLinkedSkeletonAnimationSource( "walk.skeleon" ); |
09 | ent->refreshAvailableAnimationState(); |
12 | Ogre::AnimationStateSet* animSet = ent->getAllAnimationStates(); |
13 | mAnimationState = ogreHead->getAnimationState( "Idle" ); |
14 | mAnimationState->setLoop( true ); |
15 | mAnimationState->setEnabled( true ); |
19 | mAnimationState->addTime(timeSinceLastFrame); |