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
| Type | Name | Description |
|---|---|---|
vector3 | torque | Torque vector to add as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.rigid.create()
entity:add_constant_torque({0, 1, 0})