self:set_constant_force

Client

Overwrites the rigid body's persistent constant force


Syntax

local status = self:set_constant_force(
    force
)

Parameters

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

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Overwrite the constant force
local entity = physics.rigid.create()

entity:set_constant_force({0, 0, 0})

On this page