Spine - Smoothly switch between 2 animations

I just added 3 spine animations to my game. Idle, Jump and Walk.

Unfortunately I could not figure out how to switch smoothly between animations. I read someting about mixing (crossfading) 2 animations for a certain duration on esotericsoftware.com and in the Phaser Spine Plugin, but nothing I tried did work.

Someone knows how to do it? Thanks :smiley:

1 Like

I just figured it out. Had to put setMix() inside Create and not Update :sweat_smile:

But a helper method like setDefaultMix(duration: number) would be nice though. Just like here.


Would it also liked to have it added. We can still access the property though?

this.playButton.stateData.defaultMix = 2 (not 2000)