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 )
PolygonShape shapeshape = love.physics.newRectangleShape( x, y, width, height, angle )
number xnumber ynumber widthnumber heightnumber 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 bodynumber xnumber ynumber widthnumber heightnumber angle (0)PolygonShape s
© 2006–2020 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.physics.newRectangleShape