VehicleClient

getRotationOfVehicleRecordingIdAtTime

GET_ROTATION_OF_VEHICLE_RECORDING_ID_AT_TIME0xF0F2103EFAF8CBA7

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

SignatureJavaScript
getRotationOfVehicleRecordingIdAtTime(
  id: number,
  time: number
): { x: number, y: number, z: number }
SignatureLua
getRotationOfVehicleRecordingIdAtTime(id: integer, time: number): Vector3

Usage

JavaScript
const { x, y, z } = getRotationOfVehicleRecordingIdAtTime(id, time);
Lua
local coords = getRotationOfVehicleRecordingIdAtTime(id, time)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
idintnumberinteger
timefloatnumbernumber

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.

Reference

Namespace
Vehicle VEHICLE
In the game
Vector3 GET_ROTATION_OF_VEHICLE_RECORDING_ID_AT_TIME(int id, float time)
Hash
0xF0F2103EFAF8CBA7

Open in the interactive natives reference