Code: Select all
auto currentAnimation = entity->getAnimationState("Walking");
currentAnimation->setTimePosition(0.0f);
currentAnimation->setWeight(1);
currentAnimation->setLoop(true);
currentAnimation->setEnabled(true);
Code: Select all
currentAnimation->addTime(0.05f);
I can manually make it step more than once before the first render by doing
Code: Select all
entity->getSkeleton()->_notifyManualBonesDirty();
currentAnimation->addTime(0.05f);
Using Ogre 1.9.1, also I am using SDL 2.0 so my render loop looks like
Code: Select all
window->update(false);
window->swapBuffers();
Ogre::WindowEventUtilities::messagePump();
SDL_GL_SwapWindow(sdlWindow);
entity->hasSkeleton() returns true, but I am not using skeleton animation (I thought?) I am using vertex based animation (I think). But it animates fine the first time so I don't see how this could cause it to fail in this way.
I do see a message "WARNING: Person.mesh is an older format ([MeshSerializer_v1.41]); you should upgrade it as soon as possible using the OgreMeshUpgrade tool." So I guess I should do that, but I can't see how it could cause this issue.