Difference between revisions of "love.physics.newRectangleShape"
m |
m (Arguments) |
||
Line 1: | Line 1: | ||
− | Shorthand for creating rectangluar PolygonShapes. | + | Shorthand for creating rectangluar PolygonShapes. |
+ | |||
The rectangle will be created at (x,y) in local coordinates. | The rectangle will be created at (x,y) in local coordinates. | ||
+ | |||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
− | s = love.physics.newRectangleShape( body, x, y, | + | s = love.physics.newRectangleShape( body, x, y, width, height, angle ) |
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
Line 10: | Line 12: | ||
{{param|number|x|The offset along the x-axis.}} | {{param|number|x|The offset along the x-axis.}} | ||
{{param|number|y|The offset along the y-axis.}} | {{param|number|y|The offset along the y-axis.}} | ||
− | {{param|number| | + | {{param|number|width|The width of the rectangle.}} |
− | {{param|number| | + | {{param|number|height|The height of the rectangle.}} |
{{param|number|angle (0)|The initial angle of the rectangle.}} | {{param|number|angle (0)|The initial angle of the rectangle.}} | ||
=== Returns === | === Returns === | ||
Line 17: | Line 19: | ||
=== Note === | === Note === | ||
love.physics.newRectangleShape() anchors from the center of the shape by default. | love.physics.newRectangleShape() anchors from the center of the shape by default. | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love.physics]] | * [[parent::love.physics]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=Shorthand for creating rectangluar PolygonShapes. | + | {{#set:Description=Shorthand for creating rectangluar PolygonShapes. }} |
− | }} | + | |
== Other Languages == | == Other Languages == | ||
{{i18n|love.physics.newRectangleShape}} | {{i18n|love.physics.newRectangleShape}} |
Revision as of 19:14, 30 January 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
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info