Suppose we have two GO. “first” is animated via go.animate() in it’s init():
go.animate(".", "position.x", go.PLAYBACK_LOOP_PINGPONG, 500, go.EASING_LINEAR, 1)
Also in “first”'s update() function we do:
local position = go.get_position() go.set_position(position + vmath.vector3(0, 100, 0), "second")
Because update() is called before go.animate() is evaluated and applied, “second” game object lags behind “first”.
In Apple’s SpriteKit, for example, we have other callback methods: didEvaluateActions, didSimulatePhysics, didFinishUpdate. In Defold we only have update().
So, there is no way to perfectly move objects together?