Function
Body:setMass( x, y, m, i )
Sets the mass properties directly.

If you're not sure what all this stuff means, you can use Body:setMassFromShapes after adding shapes instead.

The first two parameters will be the local coordinates of the Body's center of mass.

The third parameter is the mass, in kilograms.

The last parameter is the rotational inertia.

Synopsis
Body:setMass( x, y, m, i )
Parameters
x number The x-component of the center of mass in local coordinates.
y number The y-component of the center of mass in local coordinates.
m number The mass, in kilograms.
i number The rotational inertia, in kilograms per squared meter.
See Also
Body:setMassFromShapes  
Copyright © 2006-2010 LÖVE Development Team.