self:get_mass

Client

Retrieves the mass of the rigid body


Syntax

local value = self:get_mass()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
floatvalueCurrent mass

Examples

Get the mass of a rigid body
local entity = physics.rigid.create()

core.engine.print("info", "Rigid body mass:", entity:get_mass())

On this page