self:set_mass

Client

Sets the mass of the rigid body


Syntax

local status = self:set_mass(
    mass
)

Parameters

TypeNameDescription
floatmassMass to apply

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:set_mass(5.0)

On this page