checkVisibility: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(informations from debug console autocomplete)
(description, example, see also, syntax)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| WIP |= 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.  |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| [ignored object, lod name] '''checkVisibility''' [begin, end] |= Syntax
| [ignore, LOD] '''checkVisibility''' [beg, end] |= Syntax
|p1= ignored object: |= PARAMETER1
|p1= [ignore, LOD]: [[Array]] |= PARAMETER1
|p2= lod name: |= PARAMETER2
|p2= ignore: [[Object]] - object to exclude from calculations |= PARAMETER2
|p3= begin: |= 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= end: |= PARAMETER4
|p4= [beg, end]: [[Array]] |= PARAMETER4
| |= RETURNVALUE  
|p5= beg: [[Array]] - start position in format [[PositionASL]] |= PARAMETER5
|p6= 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  
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= SEEALSO  
|x1= <code>_cansee = <nowiki>[</nowiki>[[objNull]], "VIEW"] [[checkVisibility]] <nowiki>[</nowiki>[[eyePos]] [[player]], [[eyePos]] unit1];</code> |= Example 1
| [[lineIntersectsWith]], [[lineIntersectsSurfaces]], [[lineIntersectsObjs]], [[intersect]], [[terrainIntersect]], [[terrainIntersectASL]], [[lineIntersects]], [[cursorObject]], [[cursorTarget]] |= SEEALSO  
|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  
____________________________________________________________________________________________
____________________________________________________________________________________________

Revision as of 00:48, 3 April 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.
Groups:
Uncategorised

Syntax

Syntax:
[ignore, LOD] checkVisibility [beg, end]
Parameters:
[ignore, LOD]: Array
ignore: Object - object to exclude from calculations
LOD: String - level of details to use. Possible values are: "FIRE", "VIEW", "GEOM", "IFIRE"
[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