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