Hi guys, I am having a bit of trouble with transition.to
The problem is that if I have multiple objects with identical looping transitions applied, they fall out of sync with each other after a few iterations.
Has anyone else had this problem?
Hi guys, I am having a bit of trouble with transition.to
The problem is that if I have multiple objects with identical looping transitions applied, they fall out of sync with each other after a few iterations.
Has anyone else had this problem?
Can you show your code?
No problem…
[lua]newquad.moveToPoint = function(point)
if(point == #options.animation.data + 1) then
point = 1
end
local xTarget = (options.animation.data[point].x + options.x) * 30
local yTarget = (options.animation.data[point].y + options.y) * 30
transition.to(newquad.quad, { time = 500, x = xTarget, y = yTarget, onComplete = function()
newquad.moveToPoint(point + 1)
end})
end[/lua]
Can you show your code?
No problem…
[lua]newquad.moveToPoint = function(point)
if(point == #options.animation.data + 1) then
point = 1
end
local xTarget = (options.animation.data[point].x + options.x) * 30
local yTarget = (options.animation.data[point].y + options.y) * 30
transition.to(newquad.quad, { time = 500, x = xTarget, y = yTarget, onComplete = function()
newquad.moveToPoint(point + 1)
end})
end[/lua]