self:add_constant_central_force

Client

Adds a persistent force to the rigid body's center of mass, applied every physics step until cleared


Syntax

local status = self:add_constant_central_force(
    force
)

Parameters

TypeNameDescription
vector3forceForce vector to add as {x, y, z}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Add a constant central force
local entity = physics.rigid.create()

entity:add_constant_central_force({0, 9.8, 0})

On this page