B2Body.SetMassFromShapes

From Box2D Wiki


This article has been proposed for deletion.


The b2Body.SetMassFromShapes method calculates the mass and center of mass of a body by using the size and density of each of the shapes attached to the body. This is the default and recommended way of creating a dynamic body; if you want more precise control over a body's mass, you will have to create a MassData object.

TOOLBOX
LANGUAGES