Difference between revisions of "love.physics.newBody"
Daemonicky (talk | contribs) (direct translation, free translation at few places) |
(Undo revision 7042 by Daemonicky (talk)) |
||
Line 1: | Line 1: | ||
− | + | Create a new body. | |
+ | A body with zero mass is '''static''' and will not move. | ||
+ | Mass can be changed at any time with [[Body:setMass]] or [[Body:setMassFromShapes]]. | ||
− | + | == Function == | |
− | + | === Synopsis === | |
− | == | ||
− | === | ||
<source lang="lua"> | <source lang="lua"> | ||
body = love.physics.newBody( world, x, y, m, i ) | body = love.physics.newBody( world, x, y, m, i ) | ||
</source> | </source> | ||
− | === | + | === Arguments === |
− | {{param| | + | {{param|World|world|The world to create the body in.}} |
− | {{param| | + | {{param|number|x (0)|The x position of the body.}} |
− | {{param| | + | {{param|number|y (0)|The y position of the body.}} |
− | {{param| | + | {{param|number|m (0)|The mass of the body.}} |
− | {{param| | + | {{param|number|i (0)|The rotational inertia of the body.}} |
− | === | + | === Returns === |
− | {{param| | + | {{param|Body|body|A new body.}} |
− | == | + | == See Also == |
− | * [[parent::love. | + | * [[parent::love.physics]] |
− | * [[Constructs:: | + | * [[Constructs::Body]] |
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description= | + | {{#set:Description=Create a new body.}} |
{{#set:Since=000}} | {{#set:Since=000}} | ||
− | == | + | == Other Languages == |
{{i18n|love.physics.newBody}} | {{i18n|love.physics.newBody}} |
Revision as of 22:20, 1 September 2011
Create a new body. A body with zero mass is static and will not move. Mass can be changed at any time with Body:setMass or Body:setMassFromShapes.
Function
Synopsis
body = love.physics.newBody( world, x, y, m, i )
Arguments
World world
- The world to create the body in.
number x (0)
- The x position of the body.
number y (0)
- The y position of the body.
number m (0)
- The mass of the body.
number i (0)
- The rotational inertia of the body.
Returns
Body body
- A new body.
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