self:add_constant_central_force
Client
Adds a persistent force to the rigid body's center of mass, applied every physics step until cleared
Syntax
local status = self:add_constant_central_force(
force
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | force | Force 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_central_force({0, 9.8, 0})