A number of API calls allow you to manipulate the underlying animations backed by Ogre. While Ogre maintains the actual animation state, the sandbox is responsible for manipulating and updating these animation states.
The enabling and disabling animations determine whether the animation will contribute to the skeleton's current pose. If multiple animations are enabled, they will combine in an additive manner to determine the skeleton's final pose.
Note
As none of our soldier's animations were authored to be played simultaneously with one another, additional steps are required to blend multiple animations together.
To determine if an animation is already enabled, we can use the Animation.IsEnabled
function:
local enabled = Animation.IsEnabled(animation); Animation.SetEnabled(animation, true);