Shorthand for creating rectanglar 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 )
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
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.physics.newRectangleShape