I have a line (my tracks) and a train (right now it's just and arrow). How do I make it so the arrow can ride along the line and follow its path? Also, the path is made with this code -
local outline = display.newRect( 15, 15, 290, 450 )
outline:setFillColor( 0, 0, 0 )
outline:setStrokeColor( 25, 0, 250 )
outline.strokeWidth = 2
Should I be doing it differently?