startExpensiveSynchronousShapeTestLosProbe
START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE0x377906D8A31E5586The GTA V native START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE of the SHAPETEST namespace, as LS:MP client scripts call it: the global function startExpensiveSynchronousShapeTestLosProbe, in JavaScript and in Lua.
startExpensiveSynchronousShapeTestLosProbe(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number,
flags: number,
entity: Entity,
p8: number
): numberstartExpensiveSynchronousShapeTestLosProbe(
x1: number,
y1: number,
z1: number,
x2: number,
y2: number,
z2: number,
flags: integer,
entity: Entity,
p8: integer
): integerUsage
JavaScript
const result = startExpensiveSynchronousShapeTestLosProbe(
x1, y1, z1, x2, y2, z2, flags, entity, p8
);Lua
local result = startExpensiveSynchronousShapeTestLosProbe(
x1, y1, z1, x2, y2, z2, flags, entity, p8
)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
const result = startExpensiveSynchronousShapeTestLosProbe(pos1, pos2, flags, entity, p8);Lua · with vectors
local result = startExpensiveSynchronousShapeTestLosProbe(pos1, pos2, flags, entity, p8)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x1 | float | number | number |
y1 | float | number | number |
z1 | float | number | number |
x2 | float | number | number |
y2 | float | number | number |
z2 | float | number | number |
flags | int | number | integer |
entity | Entity | number | integer |
p8 | int | number | integer |
Returns
int JavaScript number, Lua integerOn LS:MP
✓
Friendlier helper
lsmp.raycast wraps this call and getShapeTestResult, and returns { hit, position, normal, entity }.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Does the same as startShapeTestLosProbe, except blocking until the shape test completes.
Reference
- Namespace
- Shape tests SHAPETEST
- In the game
int START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Entity entity, int p8)- Hash
0x377906D8A31E5586- Formerly
_CAST_RAY_POINT_TO_POINT_START_SHAPE_TEST_RAY