The "wiggle" animation (the 6th one), will not run, I get a "No state found for animation "wiggle....." error. If I remove one of the other animations, then it finds the wiggle! Here is the animation code, anyone know what could cause this?
Code: Select all
// Setup animation defaults
Animation::setDefaultInterpolationMode(Animation::IM_LINEAR);
Animation::setDefaultRotationInterpolationMode(Animation::RIM_LINEAR);
// load each mesh with non-default hardware buffer usage options
MeshPtr mesh = MeshManager::getSingleton().load("penguin..mesh", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY);
Entity *animatedPlayerEntity = m_pSceneMgr->createEntity(mesh->getName(), mesh->getName());
unsigned short src, dest;
if (!mesh->suggestTangentVectorBuildParams(VES_TANGENT, src, dest))
{
mesh->buildTangentVectors(VES_TANGENT, src, dest);
}
animatedPlayerEntity->setMaterialName( "PlainTexture" );
// Create a scene node and add the entity to it
SceneNode *m_pCharSceneNode = m_pSceneMgr->getRootSceneNode()->createChildSceneNode();
m_pCharSceneNode->attachObject(animatedPlayerEntity);
m_pCharSceneNode->yaw(Degree(-90));
m_pCharAnimState = animatedPlayerEntity->getAnimationState("wiggle");
m_pCharAnimState->setEnabled(true);
m_pCharAnimState->setLoop(true);