Making this work
This commit is contained in:
@@ -22,6 +22,7 @@ Character::Character(Ogre::SceneManager *scnMgr, const Ogre::String &model,
|
||||
, mGhostObject(nullptr)
|
||||
, mWorld(world)
|
||||
, mGoalDirection(0, 0, 0)
|
||||
, mUpdate(false)
|
||||
{
|
||||
setupBody();
|
||||
setupAnimations();
|
||||
@@ -38,10 +39,12 @@ bool Character::frameStarted(const Ogre::FrameEvent &evt)
|
||||
|
||||
bool Character::frameRenderingQueued(const Ogre::FrameEvent &evt)
|
||||
{
|
||||
updateBody(evt.timeSinceLastFrame);
|
||||
updateAnimations(evt.timeSinceLastFrame);
|
||||
if (evt.timeSinceLastFrame > 0)
|
||||
updateRootMotion(evt.timeSinceLastFrame);
|
||||
if (mUpdate) {
|
||||
updateBody(evt.timeSinceLastFrame);
|
||||
updateAnimations(evt.timeSinceLastFrame);
|
||||
if (evt.timeSinceLastFrame > 0)
|
||||
updateRootMotion(evt.timeSinceLastFrame);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user