Gui.animate bug (SOLVED)

I found a bug with gui animate:
https://dl.dropboxusercontent.com/u/48681498/TweenBug/My%20project/index.html

right animation code:

local function play_anim(self)
  go.animate(".", "scale", go.PLAYBACK_ONCE_PINGPONG, 1.2, go.EASING_OUTINSINE, 0.3, 0.1, play_anim)
end

function init(self)
    play_anim(self)
end

left animation code:

local function play_anim(self)
    gui.animate(self.node, gui.PROP_SCALE, vmath.vector3(1.1, 1.1, 1.1), gui.EASING_OUTSINE, 0.3, 0.1,
      play_anim, gui.PLAYBACK_ONCE_PINGPONG)
end

function init(self)
	self.node = gui.get_node("box")
    play_anim(self)
end

As you can see left animation has accumulated error.
I don’t know why, but it’s looks like some calculation after end callback.

I think this is a previously reported issue (don’t know the ticket number right now), where the callback is called after the first component (.x) is finished animating, and subsequently stopping the .y and .z animations. And since they never reach the end values, the error accumulates.

Knowing this, a workaround could be to set the correct exit value in the play_anim.

I found.


So sad ( this bug cost me few hours (

This should be fixed in the latest stable (1.2.94): Defold 1.2.94 has been released

Marking it as solved! :slight_smile:

2 Likes