Gui Spine - PLAYBACK_ONCE_BACKWARD broken (DEF-3054) (SOLVED)

#1

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.

3 Likes

100% Crash for gui particlefx (DEF-3048)
#2

Sounds really weird! I’m guessing this is for @Johan_Beck-Noren or @sven to look closer at.

1 Like

#3

Thanks, easy to reproduce, looking into it!

edit: Found the error, will continue to work on a fix for this. In the meantime here is a workaround, put this line right after your call to gui.play_spine_anim:

gui.set_spine_cursor(self.spine, 1.0)

(It will force the cursor to the “correct” location, which otherwise at the third run seems to default to 0.)

Sorry about this, thanks for reporting!

4 Likes

#4

Added a fix for this which is in review, issue: DEF-3054
Will hopefully land in next stable, beginning of Januari.

2 Likes

#5

Awesome. Thank you for fast response and action.

2 Likes

split this topic #6

4 posts were split to a new topic: Gui.animate() rotation not working

0 Likes