How to set the path of the object coordinates
table of coordinates
local tableP = { 100, 100, 150, 200, 180, 250, 200, 300}
object
local dot = display.newImage(“monkey.png”)
dot.x, dot.y = 100, 100
it is necessary that the object was consistent across all four points
100, 100
150, 200
180, 250
200, 300
tell me the example of how to do it?
when I do so
local tableP = { 100, 100, 150, 200, 180, 250, 200, 300} local dot = display.newImage("monkey.png") dot.x, dot.y = 100, 100 i=1 b=1 while i \<= 4 do onestep1 = table.concat (tableP, ", ", b, b ) onestep2 = table.concat (tableP, ", ", b+1, b+1 ) transition.to( dot, { time=1000, delay=1000 , alpha=1, x = onestep1, y= onestep2} ) b = i + ( i + 1 ) i = i+1 end
the object is passed directly to the point of 100,100 to point 200,300
and I need that he has passed on all four points
100, 100 to point 150, 200 to point 180, 250 to point 200, 300
Please help ???
