gta.processLineOfSight: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(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 =...")
(No difference)

Revision as of 15:46, 12 December 2019

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

icon-iii.png icon-vc.png icon-sa.png icon-iv.png collectAllGarbage
icon-iii.png icon-vc.png icon-sa.png icon-iv.png debugMode
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getConsole
icon-iii.png icon-vc.png icon-sa.png getRandomSkin
icon-iii.png icon-vc.png icon-sa.png icon-iv.png gta.gameSpeed
icon-iii.png icon-vc.png icon-sa.png gta.getRandomSkin
icon-iii.png gta.getSurfaceTraction
icon-iii.png icon-vc.png gta.processLineOfSight
icon-sa.png gta.setDefaultInteriors
icon-iii.png gta.setSurfaceTraction
icon-iv.png gta.setWindSpeed
icon-iii.png icon-vc.png icon-sa.png gta.showHelpBox
icon-iii.png icon-vc.png icon-sa.png icon-iv.png gta.tickCount
icon-iii.png icon-vc.png icon-sa.png icon-iv.png inPoly
icon-iii.png icon-vc.png icon-sa.png icon-iv.png platform
icon-iii.png icon-vc.png icon-sa.png icon-iv.png toColour