Native referenceFiveM

START_SHAPE_TEST_LOS_PROBE

0x7EE9F5D83DD4F90E SHAPETEST
FUNCTION SIGNATURE
int START_SHAPE_TEST_LOS_PROBE(float x1, float y1, float z1, float x2, float y2, float z2, int traceFlags, Entity entity, int optionFlags);
Property Value
Native Name START_SHAPE_TEST_LOS_PROBE
Hash 0x7EE9F5D83DD4F90E
Return Type int
Parameters x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float), traceFlags (int), entity (Entity), optionFlags (int)

Description: Asynchronously starts a line-of-sight (raycast) world probe shape test.

enum eTraceFlags
{
  None = 0,
  IntersectWorld = 1,
  IntersectVehicles = 2,
  IntersectPeds = 4,
  IntersectRagdolls = 8,
  IntersectObjects = 16,
  IntersectPickup = 32,
  IntersectGlass = 64,
  IntersectRiver = 128,
  IntersectFoliage = 256,

  IntersectEverything = 511
}
enum eTraceOptionFlags
{
  None = 0,
  OptionIgnoreGlass = 1,
  OptionIgnoreSeeThrough = 2,
  OptionIgnoreNoCollision = 4,

  OptionDefault = 7
}

NOTE: Raycasts that intersect with mission_entites (flag = 2) has limited range and will not register for far away entites. The range seems to be about 30 metres.

Use the handle with GET_SHAPE_TEST_RESULT or GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL until it returns 0 or 2.

Parameters

  • x1 (float) — Starting X coordinate.
  • y1 (float) — Starting Y coordinate.
  • z1 (float) — Starting Z coordinate.
  • x2 (float) — Ending X coordinate.
  • y2 (float) — Ending Y coordinate.
  • z2 (float) — Ending Z coordinate.
  • traceFlags (int) — Refer to eTraceFlags, this defines what the shape test will intersect with
  • entity (Entity) — An entity to ignore, or 0.
  • optionFlags (int) — Refer to eTraceOptionFlags, this defines additional options for the shape test
Back to SHAPETEST