gta.processLineOfSight

From GTA Connected
Revision as of 06:52, 19 May 2021 by Vortrex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

gta.processLineOfSight

Signature: Map results
string "entity" = Entity entityOrNil
string "position" = Vec3 hitPosition
string "normal" = Vec3 hitNormal
string "depth" = float hitDepth gta.processLineOfSight(Vec3 start, Vec3 end, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool checkSeeThroughStuff, bool ignoreSomeObjectsForCamera, [ bool ignoreShootThroughStuff = false ])

Usage: process a line of sight, to test if the line collides with certain features

Parameters

Vec3 start The start position.
Vec3 end The start position.
bool checkBuildings Whether to test if the line collides with buildings.
bool checkVehicles Whether to test if the line collides with vehicles.
bool checkPeds Whether to test if the line collides with peds.
bool checkObjects Whether to test if the line collides with objects.
bool checkDummies Whether to test if the line collides with dummies.
bool checkSeeThroughStuff Whether to test if the line collides with see through stuff.
bool ignoreSomeObjectsForCamera Whether to ignore testing if the line collides with some objects for the camera.
bool ignoreShootThroughStuff optional 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

On failure: void