self:add_constant_torque

Client

Adds a persistent torque to the rigid body, applied every physics step until cleared


Syntax

local status = self:add_constant_torque(
    torque
)

Parameters

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

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

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

entity:add_constant_torque({0, 1, 0})

On this page