Difference between revisions of "love.physics.newRectangleShape"

m (Arguments)
Line 22: Line 22:
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 +
* [[Constructs::PolygonShape]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Shorthand for creating rectangluar PolygonShapes. }}
+
{{#set:Description=Shorthand for creating rectangluar PolygonShapes.}}
 
+
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newRectangleShape}}
 
{{i18n|love.physics.newRectangleShape}}

Revision as of 17:45, 25 March 2011

Shorthand for creating rectangluar PolygonShapes.

The rectangle will be created at (x,y) in local coordinates.

Function

Synopsis

s = love.physics.newRectangleShape( body, x, y, width, height, angle )

Arguments

Body body
The Body to attach the Shape to.
number x
The offset along the x-axis.
number y
The offset along the y-axis.
number width
The width of the rectangle.
number height
The height of the rectangle.
number angle (0)
The initial angle of the rectangle.

Returns

PolygonShape s
A new PolygonShape.

Note

love.physics.newRectangleShape() anchors from the center of the shape by default.

See Also


Other Languages