VehicleClient

getRotationOfVehicleRecordingAtTime

GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME0x2058206FBE79A8AD

The GTA V native GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME of the VEHICLE namespace, as LS:MP client scripts call it: the global function getRotationOfVehicleRecordingAtTime, in JavaScript and in Lua.

SignatureJavaScript
getRotationOfVehicleRecordingAtTime(
  recording: number,
  time: number,
  script: string
): { x: number, y: number, z: number }
SignatureLua
getRotationOfVehicleRecordingAtTime(
  recording: integer,
  time: number,
  script: string
): Vector3

Usage

JavaScript
const { x, y, z } = getRotationOfVehicleRecordingAtTime(recording, time, script);
Lua
local coords = getRotationOfVehicleRecordingAtTime(recording, time, script)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
recordingintnumberinteger
timefloatnumbernumber
scriptstringstringstring

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

This native does no interpolation between pathpoints. The same rotation will be returned for all times up to the next pathpoint in the recording.

See requestVehicleRecording

Reference

Namespace
Vehicle VEHICLE
In the game
Vector3 GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME(int recording, float time, const char* script)
Hash
0x2058206FBE79A8AD

Open in the interactive natives reference