self:apply_torque

Client

Applies a continuous rotational force to the rigid body for the current physics step


Syntax

local status = self:apply_torque(
    torque
)

Parameters

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

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Apply a torque
local entity = physics.rigid.create()

entity:apply_torque({0, 5, 0})

On this page