attachEntityToEntityPhysicallyOverrideInverseMass
ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS0x168A09D1B25B0BA4The GTA V native ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS of the ENTITY namespace, as LS:MP client scripts call it: the global function attachEntityToEntityPhysicallyOverrideInverseMass, in JavaScript and in Lua.
attachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex: Entity,
secondEntityIndex: Entity,
firstEntityBoneIndex: number,
secondEntityBoneIndex: number,
secondEntityOffsetX: number,
secondEntityOffsetY: number,
secondEntityOffsetZ: number,
firstEntityOffsetX: number,
firstEntityOffsetY: number,
firstEntityOffsetZ: number,
vecRotationX: number,
vecRotationY: number,
vecRotationZ: number,
physicalStrength: number,
constrainRotation: boolean,
doInitialWarp: boolean,
collideWithEntity: boolean,
addInitialSeperation: boolean,
rotOrder: number,
invMassScaleA: number,
invMassScaleB: number
): voidattachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex: Entity,
secondEntityIndex: Entity,
firstEntityBoneIndex: integer,
secondEntityBoneIndex: integer,
secondEntityOffsetX: number,
secondEntityOffsetY: number,
secondEntityOffsetZ: number,
firstEntityOffsetX: number,
firstEntityOffsetY: number,
firstEntityOffsetZ: number,
vecRotationX: number,
vecRotationY: number,
vecRotationZ: number,
physicalStrength: number,
constrainRotation: boolean,
doInitialWarp: boolean,
collideWithEntity: boolean,
addInitialSeperation: boolean,
rotOrder: integer,
invMassScaleA: number,
invMassScaleB: number
)⚠
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
attachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
secondEntityOffsetX, secondEntityOffsetY, secondEntityOffsetZ, firstEntityOffsetX,
firstEntityOffsetY, firstEntityOffsetZ, vecRotationX, vecRotationY, vecRotationZ,
physicalStrength, constrainRotation, doInitialWarp, collideWithEntity, addInitialSeperation,
rotOrder, invMassScaleA, invMassScaleB
);Lua
attachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
secondEntityOffsetX, secondEntityOffsetY, secondEntityOffsetZ, firstEntityOffsetX,
firstEntityOffsetY, firstEntityOffsetZ, vecRotationX, vecRotationY, vecRotationZ,
physicalStrength, constrainRotation, doInitialWarp, collideWithEntity, addInitialSeperation,
rotOrder, invMassScaleA, invMassScaleB
)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
attachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
secondEntityOffset, firstEntityOffset, vecRotation, physicalStrength, constrainRotation,
doInitialWarp, collideWithEntity, addInitialSeperation, rotOrder, invMassScaleA, invMassScaleB
);Lua · with vectors
attachEntityToEntityPhysicallyOverrideInverseMass(
firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
secondEntityOffset, firstEntityOffset, vecRotation, physicalStrength, constrainRotation,
doInitialWarp, collideWithEntity, addInitialSeperation, rotOrder, invMassScaleA,
invMassScaleB
)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
firstEntityIndex | Entity | number | integer |
secondEntityIndex | Entity | number | integer |
firstEntityBoneIndex | int | number | integer |
secondEntityBoneIndex | int | number | integer |
secondEntityOffsetX | float | number | number |
secondEntityOffsetY | float | number | number |
secondEntityOffsetZ | float | number | number |
firstEntityOffsetX | float | number | number |
firstEntityOffsetY | float | number | number |
firstEntityOffsetZ | float | number | number |
vecRotationX | float | number | number |
vecRotationY | float | number | number |
vecRotationZ | float | number | number |
physicalStrength | float | number | number |
constrainRotation | BOOL | boolean | boolean |
doInitialWarp | BOOL | boolean | boolean |
collideWithEntity | BOOL | boolean | boolean |
addInitialSeperation | BOOL | boolean | boolean |
rotOrder | int | number | integer |
invMassScaleA | float | number | number |
invMassScaleB | float | number | number |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Reference
- Namespace
- Entity ENTITY
- In the game
void ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS(Entity firstEntityIndex, Entity secondEntityIndex, int firstEntityBoneIndex, int secondEntityBoneIndex, float secondEntityOffsetX, float secondEntityOffsetY, float secondEntityOffsetZ, float firstEntityOffsetX, float firstEntityOffsetY, float firstEntityOffsetZ, float vecRotationX, float vecRotationY, float vecRotationZ, float physicalStrength, BOOL constrainRotation, BOOL doInitialWarp, BOOL collideWithEntity, BOOL addInitialSeperation, int rotOrder, float invMassScaleA, float invMassScaleB)- Hash
0x168A09D1B25B0BA4- Introduced
- Game build 2944 legacy numbering