Difference between revisions of "love.physics.newBody"
m (1 revision: Imported docs from potato.) |
|||
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 == | == Function == | ||
Line 17: | Line 23: | ||
* [[parent::love.physics]] | * [[parent::love.physics]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | {{#set:Description=}} | + | {{#set:Description=Create a new body. |
+ | }} |
Revision as of 16:17, 14 February 2010
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.