Shorthand for creating rectangular PolygonShapes.
By default, the local origin is located at the center of the rectangle as opposed to the top left for graphics.
Available since LÖVE 0.8.0 |
These variants are not supported in earlier versions. |
shape = love.physics.newRectangleShape( width, height )
number width
number height
PolygonShape shape
shape = love.physics.newRectangleShape( x, y, width, height, angle )
number x
number y
number width
number height
number angle (0)
PolygonShape shape
Removed in LÖVE 0.8.0 |
This variant is not supported in that and later versions. |
s = love.physics.newRectangleShape( body, x, y, width, height, angle )
Body body
number x
number y
number width
number height
number angle (0)
PolygonShape s