SetVehicleLinearVelocity

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
SetVehicleLinearVelocity

Type: Function
Context: Server
Introduced: v1.0

Description

Set the vehicle's linear velocity.

Syntax

SetVehicleLinearVelocity(vehicle, x, y, z [, reset])

Parameters

  • vehicle
    The vehicle identifier.
  • x
    The X axis velocity
  • y
    The Y axis velocity
  • z
    The Z axis velocity
  • reset (optional)
    true to reset the linear velocity, default: false

Return Value

  • This function returns true.

Example

SetVehicleLinearVelocity(vehicleId, 100.0, 0.0, 0.0, false)
-- Push the vehicle towards 100.0 units in X axis

See also