Line

Returns a Line collision shape object

new virtuosity.collisionManager.shape.Line(x1, y1, x2, y2);


Parameter Type Description
x1 Number x position of the first point of the Line
y1 Number y position of the first point of the Line
x2 Number x position of the second point of the Line
y2 Number y position of the second point of the Line

Methods

Properties


Methods

position1

Sets the position of the box

virtuosity.collisionManager.shape.Line.position1(x1, y1);


Parameter Type Description
x1 Number x1 position of the Line
y1 Number y1 position of the Line

position2

Sets the position of the box

virtuosity.collisionManager.shape.Line.position2(x2, y2);


Parameter Type Description
x2 Number x2 position of the Line
y2 Number y2 position of the Line

scaling

Sets the width of the line

virtuosity.collisionManager.shape.Line.scaling(width);


Parameter Type Description
width Int width of the Line


Properties

x1

Number

x1 position of the Line

virtuosity.collisionManager.shape.Line.x1

y1

Number

y1 position of the Line

virtuosity.collisionManager.shape.Line.y1

x2

Number

x2 position of the Line

virtuosity.collisionManager.shape.Line.x2

y2

Number

y2 position of the Line

virtuosity.collisionManager.shape.Line.y2

width

Number

width of the Line

virtuosity.collisionManager.shape.Line.width