Description
| Affected by | Not affected by |
|---|---|
| - terrain grid - obstacles - particles (with blockAIVisibility = 1) |
- daylight - distance - overcast - fog |
Checks if one position is visible from another position and how much.
Note
Particles that have
blockAIVisibilityset to 1 will influence the result, but will never make checkVisibility return 0; an extremely small number will be returned instead.
Syntax
[ignore, LOD, ignore2] checkVisibility [beg, end]
Parameters:
ignore: Object - object to exclude from calculationsLOD: String - level of details to use. Possible values are:"FIRE","VIEW","GEOM","IFIRE", and Arma 3 v2.02"PHYSX"ignore2: Object - (Optional, default objNull) second object to exclude from calculations (since arma3 1.62)beg: PositionASL - start positionend: PositionASL - end position
Returns: Number - how much end position is visible to start position in range 0..1, where 1 is fully visible.
Examples
Example 1
private _canSee = [objNull, "VIEW"] checkVisibility [eyePos player, eyePos unit1];
See also
lineIntersectsWith · lineIntersectsSurfaces · lineIntersectsObjs · intersect · terrainIntersect · terrainIntersectASL · terrainIntersectAtASL · lineIntersects · cursorObject · cursorTarget · disableRemoteSensors