PhysicsClientNot in this build

getDamping

GET_DAMPING0x8C520A929415BCD2

The GTA V native GET_DAMPING of the PHYSICS namespace, as LS:MP client scripts call it: the global function getDamping, in JavaScript and in Lua.

SignatureJavaScript
getDamping(entity: Entity, type: number): { x: number, y: number, z: number }
SignatureLua
getDamping(entity: Entity, type: integer): Vector3
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const { x, y, z } = getDamping(entity, type);
Lua
local coords = getDamping(entity, type)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
typeintnumberinteger

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
Physics PHYSICS
In the game
Vector3 GET_DAMPING(Entity entity, int type)
Hash
0x8C520A929415BCD2
Introduced
Game build 3407 legacy numbering

Open in the interactive natives reference