checkVisibility: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(changed version, command was added september 2015)
(optional second object to ignore)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| [ignore, LOD] '''checkVisibility''' [beg, end] |= Syntax
| [ignore, LOD, ignore2] '''checkVisibility''' [beg, end] |= Syntax
|p1= [ignore, LOD]: [[Array]] |= PARAMETER1
|p1= [ignore, LOD, ignore2]: [[Array]] |= PARAMETER1
|p2= ignore: [[Object]] - object to exclude from calculations |= PARAMETER2
|p2= ignore: [[Object]] - object to exclude from calculations |= PARAMETER2
|p3= LOD: [[String]] - level of details to use. Possible values are: <tt>"FIRE"</tt>, <tt>"VIEW"</tt>, <tt>"GEOM"</tt>, <tt>"IFIRE"</tt> |= PARAMETER3
|p3= LOD: [[String]] - level of details to use. Possible values are: <tt>"FIRE"</tt>, <tt>"VIEW"</tt>, <tt>"GEOM"</tt>, <tt>"IFIRE"</tt>|= PARAMETER3
|p4= [beg, end]: [[Array]] |= PARAMETER4
|p4= ignore2 (Optional): [[Object]] - second object to exclude from calculations (Since Arma 3 v1.61.136673) |= PARAMETER2
|p5= beg: [[Array]] - start position in format [[PositionASL]] |= PARAMETER5
|p5= [beg, end]: [[Array]] |= PARAMETER4
|p6= end: [[Array]] - end position in format [[PositionASL]]  |= PARAMETER6
|p6= beg: [[Array]] - start position in format [[PositionASL]] |= PARAMETER5
|p7= end: [[Array]] - end position in format [[PositionASL]]  |= PARAMETER6
| [[Number]] - how much end position is visible to start position in range 0..1, where 1 is fully visible.|= RETURNVALUE  
| [[Number]] - how much end position is visible to start position in range 0..1, where 1 is fully visible.|= RETURNVALUE  
____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 14:24, 9 June 2016

Hover & click on the images for description

Description

Description:
Checks if one position is visible from another position and how much. The results can be affected by getTerrainGrid value, especially if position is near the ground. Particle effects such as smoke can also affect the results.
Groups:
Uncategorised

Syntax

Syntax:
[ignore, LOD, ignore2] checkVisibility [beg, end]
Parameters:
[ignore, LOD, ignore2]: Array
ignore: Object - object to exclude from calculations
LOD: String - level of details to use. Possible values are: "FIRE", "VIEW", "GEOM", "IFIRE"
ignore2 (Optional): Object - second object to exclude from calculations (Since Arma 3 v1.61.136673)
[beg, end]: Array
beg: Array - start position in format PositionASL
end: Array - end position in format PositionASL
Return Value:
Number - how much end position is visible to start position in range 0..1, where 1 is fully visible.

Examples

Example 1:
_cansee = [objNull, "VIEW"] checkVisibility [eyePos player, eyePos unit1];

Additional Information

See also:
lineIntersectsWithlineIntersectsSurfaceslineIntersectsObjsintersectterrainIntersectterrainIntersectASLlineIntersectscursorObjectcursorTarget

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes


Bottom Section