gta.processLineOfSight

Revision as of 15:46, 12 December 2019 by Mex (talk | contribs) (Created page with "{{ScriptItem |endpoint = client |type = function |name = gta.processLineOfSight |usage = process a line of sight, to test if the line collides with certain features |return1 =...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function Client Only icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Client 1.0.0

Map gta.processLineOfSight(Vec3 start, Vec3 end, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool checkSeeThroughStuff, bool ignoreSomeObjectsForCamera, [ bool ignoreShootThroughStuff = false ])

The gta.processLineOfSight function is used to process a line of sight, to test if the line collides with certain features.

Parameters

1) Vec3 start The start position.
2) Vec3 end The start position.
3) bool checkBuildings Whether to test if the line collides with buildings.
4) bool checkVehicles Whether to test if the line collides with vehicles.
5) bool checkPeds Whether to test if the line collides with peds.
6) bool checkObjects Whether to test if the line collides with objects.
7) bool checkDummies Whether to test if the line collides with dummies.
8) bool checkSeeThroughStuff Whether to test if the line collides with see through stuff.
9) bool ignoreSomeObjectsForCamera Whether to ignore testing if the line collides with some objects for the camera.
10) bool ignoreShootThroughStuff Optional, defaults to false. Whether to ignore testing if the line collides with shoot through stuff.

Return

Map Results


string "entity" = Entity entityOrNil
string "position" = Vec3 hitPosition
string "normal" = Vec3 hitNormal
string "depth" = float hitDepth.

Notes

There aren't any notes for this function.

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.

Related

Client Related

        collectAllGarbage
        debugMode
        getConsole
      getRandomSkin
        gta.gameSpeed
      gta.getRandomSkin
  gta.getSurfaceTraction
    gta.processLineOfSight
  gta.setDefaultInteriors
  gta.setSurfaceTraction
  gta.setWindSpeed
      gta.showHelpBox
        gta.tickCount
        inPoly
        platform
        toColour