getVehicleDeformationAtPos
GET_VEHICLE_DEFORMATION_AT_POS0x4EC6CFBC7B2E9536The GTA V native GET_VEHICLE_DEFORMATION_AT_POS of the VEHICLE namespace, as LS:MP client scripts call it: the global function getVehicleDeformationAtPos, in JavaScript and in Lua.
getVehicleDeformationAtPos(
vehicle: Vehicle,
offsetX: number,
offsetY: number,
offsetZ: number
): { x: number, y: number, z: number }getVehicleDeformationAtPos(
vehicle: Vehicle,
offsetX: number,
offsetY: number,
offsetZ: number
): Vector3Usage
JavaScript
const { x, y, z } = getVehicleDeformationAtPos(vehicle, offsetX, offsetY, offsetZ);Lua
local coords = getVehicleDeformationAtPos(vehicle, offsetX, offsetY, offsetZ)
-- coords.x, coords.y, coords.zThree consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
const coords = getVehicleDeformationAtPos(vehicle, offset);Lua · with vectors
local coords = getVehicleDeformationAtPos(vehicle, offset)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
offsetX | float | number | number |
offsetY | float | number | number |
offsetZ | float | number | number |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 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.
The only example I can find of this function in the scripts, is this:
struct _s = getVehicleDeformationAtPos(rPtr((A_0) + 4), 1.21f, 6.15f, 0.3f);PC scripts:
v_5/*{3}*/ = getVehicleDeformationAtPos(a_0._f1, 1.21, 6.15, 0.3);
Reference
- Namespace
- Vehicle VEHICLE
- In the game
Vector3 GET_VEHICLE_DEFORMATION_AT_POS(Vehicle vehicle, float offsetX, float offsetY, float offsetZ)- Hash
0x4EC6CFBC7B2E9536