getCollisionNormalOfLastHitForEntity
GET_COLLISION_NORMAL_OF_LAST_HIT_FOR_ENTITY0xE465D4AB7CA6AE72The GTA V native GET_COLLISION_NORMAL_OF_LAST_HIT_FOR_ENTITY of the ENTITY namespace, as LS:MP client scripts call it: the global function getCollisionNormalOfLastHitForEntity, in JavaScript and in Lua.
getCollisionNormalOfLastHitForEntity(
entity: Entity
): { x: number, y: number, z: number }getCollisionNormalOfLastHitForEntity(entity: Entity): Vector3Usage
JavaScript
const { x, y, z } = getCollisionNormalOfLastHitForEntity(entity);Lua
local coords = getCollisionNormalOfLastHitForEntity(entity)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
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.
Reference
- Namespace
- Entity ENTITY
- In the game
Vector3 GET_COLLISION_NORMAL_OF_LAST_HIT_FOR_ENTITY(Entity entity)- Hash
0xE465D4AB7CA6AE72