GetVehicleRotation

From Onset Developer Wiki
Revision as of 07:14, 16 November 2019 by 28days (talk | contribs)
GetVehicleRotation

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Returns the vehicle rotation (yaw, pitch and roll) of the specified vehicle.

Syntax

GetVehicleRotation(vehicle)

Parameters

  • vehicle
    The vehicle identifier

Return Value

  • The rotation yaw, pitch and roll of the vehicle.

Example

<syntaxhighlting=Lua> local rx, ry, rz = GetVehicleRotation(vehicle) -- Reset pitch and roll, leave yaw alone SetVehicleRotation(vehicle, 0.0, ry, 0.0) </syntaxhighlighting>

See also