I'm changing some animation code and I created animation class that has updateAnimation method:
if(currentAnimation!=null)
{
currentAnimation.apply(skeleton, this.animTime, loopAnimation);
this.animTime+=animStep;
skeleton.updateWorldTransform();
skeleton.update(animStep);
}
animStep is always 0.075f;
I'm not sure about animTime though - I tried zeroing it (as a local variable) every time currentAnimation changes and I tried setting it globally (incrementing by animStep once a frame). The animation seems to show only the end of the animation though in not looped animations...
My looped animation work properly (but it's posibble I get into the middle of the loop sometimes instead of always start from the beginning?).
I have several such animated objects...