Hello,
I'm new to spine and I have an issue when I play an animation on a second track, the constraints/bones affected by that animation "freezes" when the animation ends.
I'm probably doing something wrong but I can't figure out what.
Here's an extract of my code controlling the animations:
public void PlayStart(){
skeletonAnimation.AnimationState.SetEmptyAnimations (0);
skeletonAnimation.AnimationState.SetAnimation (0, "Run", true);
}
public void PlayHit(){
skeletonAnimation.AnimationState.SetEmptyAnimation (0, 0);
skeletonAnimation.AnimationState.SetAnimation (0, "Hit", false);
skeletonAnimation.AnimationState.AddAnimation (0, "Run", true, 0);
}
public void PlayLaneChange(MoveDirection _direction){
if (_direction == MoveDirection.Up) {
skeletonAnimation.AnimationState.SetAnimation (1, "ChangeLaneUP", false);
} else {
skeletonAnimation.AnimationState.SetAnimation (1, "ChangeLaneDown", false);
}
}
when I start the game I call PlayStart, I have some other animations that I can call when the player gets hit or when he attacks and so on. This only modifies the track 0 and all seems to work fine. But as soon as I play an animation on track 1 so that I can blend the "ChangeLane" animation with the run animation, it breaks the constraints/bones that are modified by the "ChangeLane" animation and the animations from track 0 can't modify them until I do a SetEmptyAnimations().
I've tried to search for solutions online but I couldn't find anything, any idea what I can do to fix that?
Thanks!