self:apply_central_force
Client
Applies a continuous force to the vehicle body's center of mass for the current physics step
Syntax
local status = self:apply_central_force(
force
)Parameters
| Type | Name | Description |
|---|---|---|
vector3 | force | Force vector to apply as {x, y, z} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = physics.vehicle.create()
entity:apply_central_force({0, 20, 0})