Problems defining a physics "shape"

Apparently don’t understand how to define a shape for a physics body because I just can’t make it work correctly.

I’ve defined a line using:
band = display.newLine( 0, 300, locX,locY )
band.width = 4

so a 4 pixel wide line runs from a fixed point (0, 300) to a location that I have touched on the screen.

Now I want to define a physics shape that tracks this line.

I believe the coordinates would be with reference to the lines center point (by default) and therefore the following should work:

shape = { -halfX,(-halfY-2), halfX,(halfY-2), halfX,(halfY+2), -halfX,(-halfY+2) }

where halfX = locX/2
halfY = locY/2

This almost works in that the shape overlays the line but it stops at the midpoint of the line… so the shape is only half the length of the line.

Any help would be GREATLY appreciated… thanks!
Tim

[import]uid: 16901 topic_id: 8920 reply_id: 308920[/import]

I believe I have figured it out. It appears that lines are defined with reference to the fist point… not the center of the line. [import]uid: 16901 topic_id: 8920 reply_id: 32588[/import]