Shape:getMass

Edit

Returns the mass of the Shape, in kilograms. The mass is the volume multiplied by the density.

mass = Shape:getMass()

Arguments

None

Returns

NameTypeDescription
massnumber The mass of the Shape, in kilograms.

Notes

The mass of a Collider is the sum of the mass of all of its Shapes. The center of a mass of a Collider is the average of all of its Shapes, weighted by their mass.

MeshShape and TerrainShape do not have mass, and will return 0.

See also