I have a simple spine animation for the gui.
I want to play it back and forth but problem is that when after using PLAYBACK_ONCE_BACKWARD twice the spine animation immediately shows the last frame of the animation and calls the callback function without animating.
function on_input(self, action_id, action)
if action_id == hash("space") and action.pressed == true then
gui.play_spine_anim(self.spine, hash("clouds_enter"), gui.PLAYBACK_ONCE_BACKWARD, {}, function()
print("done")
end)
end
end
In short, when pressing space, the above code will animate it correct twice (!) but then it will immediately be on the last frame and print done as soon as I press space instead of animating first. Weird huh?
I have setup a test project for anyone who would like to take a look at it.