As always, we are going to use the code from the previous chapter, and for once we don't need to delete anything:
FrameListener. Add a pointer holding the entity we want to animate and a pointer to the used animation state:
Ogre::Entity* _ent; Ogre::AnimationState* _aniState;
FrameListenerto get the entity pointer as a new parameter:
Example34FrameListener(Ogre::SceneNode* node,Ogre::Entity* ent,RenderWindow* win,Ogre::Camera* cam)
_ent = ent;
Dancefrom the entity and ...