- Edited
Animation Stuck on Frame
I am trying to get my character to wave his arms and scream when he gets attacked. I put this animation on track 1 and mixed in on top of my walk animation on track 0. The problem is that the waving animation is getting stuck on the last frame and it wont get back to the walking position. This is the code I am using
public void Scared_Animation(){
skeletonAnimation.state.SetAnimation (1, Scared_Anim, false);
}
I am calling this function when the character collides with the enemy.
08 Jan 2017, 04:47
Nevermind I figured this one out by creating a new function that contained skeletonAnimation.skeleton.SetToSetupPose();
skeletonAnimation.state.ClearTracks(); than I invoked it after 1 second.
Is there a reason why you were playing the animation on track 0 instead of track 1? (the first param on the SetAnimation call).