RedM Natives

SET_OBJECT_PHYSICS_PARAMS

Adjust the physics parameters of a prop, or otherwise known as "object".

Hash0xF6DF6E90DE7DF90F
Runtime nameSetObjectPhysicsParams
NamespaceOBJECT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF6DF6E90DE7DF90F

Signature

void SET_OBJECT_PHYSICS_PARAMS(Object object, float weight, float p2, float p3, float p4, float p5, float gravity, float p7, float p8, float p9, float p10, float buoyancy);

Parameters

NameTypeDescription
objectObject—
weightfloat—
p2float—
p3float—
p4float—
p5float—
gravityfloat—
p7float—
p8float—
p9float—
p10float—
buoyancyfloat—

Returns void

Description

Adjust the physics parameters of a prop, or otherwise known as "object". This is useful for simulated gravity.

Other parameters seem to be unknown.

p2: seems to be weight and gravity related. Higher value makes the obj fall faster. Very sensitive?
p3: seems similar to p2
p4: makes obj fall slower the higher the value
p5: similar to p4

Usage

Lua
SetObjectPhysicsParams(object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy)

-- always works, by hash
Citizen.InvokeNative(0xF6DF6E90DE7DF90F, object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy)
JavaScript and C#
JavaScript
SetObjectPhysicsParams(object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy);

// by hash
Citizen.invokeNative('0xF6DF6E90DE7DF90F', object, weight + 0.0000001, p2 + 0.0000001, p3 + 0.0000001, p4 + 0.0000001, p5 + 0.0000001, gravity + 0.0000001, p7 + 0.0000001, p8 + 0.0000001, p9 + 0.0000001, p10 + 0.0000001, buoyancy + 0.0000001);
C#
Function.Call((Hash)0xF6DF6E90DE7DF90F, object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.