Dotted lines between two points

How to connect two objects by a straight dotted line.( A line of dots or circles)

As below

SSK provides several helpers for various line styles.
 
For example, this code would draw a dotted line between three circles( similar to your image):

local group = display.newGroup() local c1 = display.newCircle( group, 100, 100, 10 ) local c2 = display.newCircle( group, 300, 50, 10 ) local c3 = display.newCircle( group, 400, 150, 10 ) c1:setFillColor(1,0,0) c2:setFillColor(1,0,0) c3:setFillColor(1,0,0) local newLine = ssk.display.newLine newLine( group, c1.x, c1.y, c2.x, c2.y, { radius = 3, gapLen = 15, fill = \_K\_, style = "dotted" } ) newLine( group, c2.x, c2.y, c3.x, c3.y, { radius = 3, gapLen = 15, fill = \_K\_, style = "dotted" } ) c1:toFront() c2:toFront() c3:toFront()

https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/display_lines/
 
 
Here is a picture of just some of the things SSK line helpers can do.
lines.gif

SSK provides several helpers for various line styles.
 
For example, this code would draw a dotted line between three circles( similar to your image):

local group = display.newGroup() local c1 = display.newCircle( group, 100, 100, 10 ) local c2 = display.newCircle( group, 300, 50, 10 ) local c3 = display.newCircle( group, 400, 150, 10 ) c1:setFillColor(1,0,0) c2:setFillColor(1,0,0) c3:setFillColor(1,0,0) local newLine = ssk.display.newLine newLine( group, c1.x, c1.y, c2.x, c2.y, { radius = 3, gapLen = 15, fill = \_K\_, style = "dotted" } ) newLine( group, c2.x, c2.y, c3.x, c3.y, { radius = 3, gapLen = 15, fill = \_K\_, style = "dotted" } ) c1:toFront() c2:toFront() c3:toFront()

https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/display_lines/
 
 
Here is a picture of just some of the things SSK line helpers can do.
lines.gif