Vehicle Body

self:apply_central_impulse

Shared

Applies an instantaneous impulse to the vehicle body's center of mass

Syntax

local status = self:apply_central_impulse(
    impulse
)

Parameters

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

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Apply a central impulse
local entity = physics.vehicle.create()

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

On this page