addLine(length, offsetX, offsetY, rotation) → {p2.Line}
Adds a Line shape to this Body.The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0].You can control the offset from the center of the body and the rotation.
Parameters
Name Type Argument Default Description length number The length of this line (in pixels) offsetX number <optional> 0 Local horizontal offset of the shape relative to the body center of mass. offsetY number <opti