When animating a vector property using gui.animate, the callback appears to be called just after updating the first component.
function init(self) self.node = gui.get_node("test") gui.animate(self.node, "position", vmath.vector3(200, 200, 1), go.EASING_LINEAR, 1, 1, function() print("Position during callback " .. gui.get_position(self.node)) end) end function update(self, dt) print(gui.get_position(self.node)) end
DEBUG:SCRIPT: vmath.vector3(193.33322143555, 193.33322143555, 0.96666610240936)
DEBUG:SCRIPT: vmath.vector3(196.66654968262, 196.66654968262, 0.98333275318146)
DEBUG:SCRIPT: Position during callback [200.000000, 196.666550, 0.983333]
DEBUG:SCRIPT: vmath.vector3(200, 200, 1)
DEBUG:SCRIPT: vmath.vector3(200, 200, 1)
I got similar results with scale and color. Works fine in go.animate.