I have noticed that the AnimationBlender dies/freezes (the animation not the application) when the blend function is called between the transition time of the last blend.
I am specifically talking about "BlendWhileAnimating" state here.
I have tested many things like removing a lot of code from the AnimationBlender itself and I still have been unsuccuessful in fixing this without causing a thousand more.
http://www.ogre3d.org/wiki/index.php/An ... changes.29
When my character walks if they stop pressing a directional key the animation is called for "Idle" using the BlendWhileAnimating, (see below)
the problem arises from the user then pressing a directional key (which calls blend to "Run") within the time of the transition. (say 0.5 seconds in my game).
It basically freezes the characters animation state.
Example of the blend code
Code: Select all
if(isRunning) pAnimationBlender->blend("Run", AnimationBlender::BlendWhileAnimating, 0.5, true ); if(!isRunning) pAnimationBlender->blend("Idle", AnimationBlender::BlendWhileAnimating, 0.5, true );
Have a timer to count for the transition time between animations and do not allow a blend between this time and have a stack that when the time is up it will call whatever state was set to next in my own code.
I have no idea why the animation blender as it stands fails like this in the transition time. It works perfectly otherwise.
I've had my teacher and peers look through and they all agree its the animation blender not my code, but no one can pin point the problem either
Now its up to you Ogre3derer's !
Can you find the problem?