love.physics.newRectangleShape

Shorthand for creating rectanglar PolygonShapes.

Function

Synopsis

shape = love.physics.newRectangleShape( body[, x, y ], width, height[, angle ] )

Required Arguments

Removed in LÖVE 0.8.0
Body body
The Body to attach the Shape to.
number width
The width of the rectangle.
number height
The height of the rectangle.

Optional Arguments

number x
The offset along the x-axis.
number y
The offset along the y-axis.
number angle (0)
The initial angle of the rectangle.

Returns

PolygonShape shape
A new PolygonShape.

See Also


Other Languages