lua.box2d.body.mass
mass , rotationalInertia , x,y = body:mass( mass , rotationalInertia , x,y )
mass = ( body:mass(mass) )
get/set mass values, all values are optional but x,y must be a pair. Unset values will remain unchanged.
x,y is center of mass
We return 4 values but as the first one is mass you can simply ignore the rest by wrapping the function in ()
Since adding shapes will auto generate these values, be aware that you will be fighting auto mass generation when setting this value.
Adding shapes or changing the body type will auto generate these values.