Gui.animate() rotation not working (SOLVED)

#1

I have a sneaky feeling this is still broken.

gui.animate(gui.get_node("record"), "rotation.z", 360, go.EASING_LINEAR, 4, 0, go.PLAYBACK_LOOP_FORWARD)

Rotates correctly, once, but doesn’t do the usual repetition (nor does go.PLAYBACK_LOOP_PINPONG work properly, or any other that I have tried!)

Should i be using gui.PLAYBACK_LOOP_PINGPONG or something?

also, do GUI elements ignore z layers on purpose? If i copy and paste a node, it moves to the top, regardless of its z-layer.

0 Likes

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

That is weird, and I could reproduce it too.
I’ll check it out tomorrow to see if I find something obvious.

EDIT: My iframe didn’t work, so here’s the link

0 Likes

#3

No it’s not broken. With gui.animate you have to use gui constants instead of go constants. Also pay attention that before PLAYBACK should be callback.
instead of

gui.animate(gui.get_node("record"), "rotation.z", 360, go.EASING_LINEAR, 4, 0, go.PLAYBACK_LOOP_FORWARD)

it should be

gui.animate(gui.get_node("record"), "rotation.z", 360, gui.EASING_LINEAR, 4, 0, nil, gui.PLAYBACK_LOOP_FORWARD)

gui.animate(node, property, to, easing, duration, [delay], [complete_function], [playback])

3 Likes

#4

Lol, good catch @AGulev!

2 Likes

#5

aaaaaaaaaaaamigo!!!

thanks AGulev!!

2 Likes