Shape:getDensity

Edit

Returns the density of the Shape, in kilograms per cubic meter. The density, combined with the volume of the Shape, determines the Shape's overall mass.

density = Shape:getDensity()

Arguments

None

Returns

NameTypeDescription
densitynumber The density of the Shape, in kilograms per cubic meter.

Notes

The default density is 1,000, which is the density of water.

MeshShape and TerrainShape do not have volume, and return 0.

See also