I am looking for insight on the use of transitions - I have an object moving around the screen (in a loop, different transitions returning to the starting point) and in the simulator, it works somewhat ok. On a device it skips and jumps and restarts in odd places.
Are there differences to account for? Maybe different refresh rates or timing between the simulator and a device?
General questions - am I even taking the right approach with transitions stacked like I have? Are there transition libraries available? How can I model a curved path with a transition?
My understanding is obviously pretty basic here - any help is welcome! Thanks!
Example below -
local function moveDrone() local rand = math.random(1,7) --rand = 1 local drone\_orig\_y = droneImage.y local drone\_orig\_x = droneImage.x if rand == 1 then print ("in moveDrone function") -- move to the left and back local rand3 = math.random(300,350) transition.to( droneImage, { x = drone\_orig\_x-rand3, time=1000, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { time = 400, rotation = -20, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 810, delta=true, rotation = 40, time=400, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 1020, x = drone\_orig\_x, time=1000, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 1380, delta=true, rotation = -20, time=750, transition=easing.inOutQuad, tag="txtag"} ) timer.performWithDelay (2500, function() moveDrone() end) elseif rand == 2 then -- move to the right and back local rand3 = math.random(300,350) transition.to( droneImage, { x = drone\_orig\_x+rand3, time=1000, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { time = 400, rotation = 20, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 810, delta=true, rotation = -40, time=400, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 1020, x = drone\_orig\_x, time=1000, transition=easing.inOutQuad, tag="txtag"} ) transition.to( droneImage, { delay = 1380, delta=true, rotation = 20, time=750, transition=easing.inOutQuad, tag="txtag"} ) timer.performWithDelay (2500, function() moveDrone() end) elseif rand == 3 then