checkVisibility: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([a-zA-Z0-9\. _"']+)<\/tt>" to "{{hl|$1}}")
m (Some wiki formatting)
Line 6: Line 6:
|gr1= Math - Geometry
|gr1= Math - Geometry


|descr= 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.
|descr= 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.


|s1= [ignore, LOD, ignore2] [[checkVisibility]] [beg, end]
|s1= [ignore, LOD, ignore2] [[checkVisibility]] [beg, end]


|p1= [ignore, LOD, ignore2]: [[Array]]
|p1= ignore: [[Object]] - object to exclude from calculations


|p2= ignore: [[Object]] - object to exclude from calculations
|p2= LOD: [[String]] - level of details to use. Possible values are: {{hl|"FIRE"}}, {{hl|"VIEW"}}, {{hl|"GEOM"}}, {{hl|"IFIRE"}}, and {{GVI|arma3|2.02|size=0.75}} {{hl|"PHYSX"}}


|p3= LOD: [[String]] - level of details to use. Possible values are: {{hl|"FIRE"}}, {{hl|"VIEW"}}, {{hl|"GEOM"}}, {{hl|"IFIRE"}}, {{hl|"PHYSX"}} - PhysX geometry LOD (since Arma 3 v2.01.146666)
|p3= ignore2: [[Object]] - (Optional, default [[objNull]]) second object to exclude from calculations
|p3since= arma3 1.62


|p4= ignore2 (Optional): [[Object]] - second object to exclude from calculations (Since Arma 3 v1.62)
|p4= beg: [[Array]] - start position in format [[PositionASL]]


|p5= [beg, end]: [[Array]]
|p5= end: [[Array]] - end position in format [[PositionASL]]
 
|p6= beg: [[Array]] - start position in format [[PositionASL]]
 
|p7= end: [[Array]] - end position in format [[PositionASL]]


|r1= [[Number]] - how much end position is visible to start position in range 0..1, where 1 is fully visible.
|r1= [[Number]] - how much end position is visible to start position in range 0..1, where 1 is fully visible.
Line 30: Line 29:
}}
}}


<dl class="command_description">
{{Note
 
|user= BaerMitUmlaut
<dt></dt>
|timestamp= 20160808223800
<dd class="notedate">Posted on August 8, 2016 - 22:38 (UTC)</dd>
|text= Particles that have blockAIVisibility set to 1 will influence the result, but will not make [[checkVisibility]] return 0. Instead an extremly small number will be returned.<br>
<dt class="note">[[User:BaerMitUmlaut|BaerMitUmlaut]]</dt>
<dd class="note">
Particles that have blockAIVisibility set to 1 will influence the result, but will not make checkVisibility return 0. Instead an extremly small number will be returned.<br>
Distance, fog, overcast, rain and nighttime have no effect on the result.
Distance, fog, overcast, rain and nighttime have no effect on the result.
</dd>
}}
 
</dl>

Revision as of 14:58, 24 November 2021

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:
Math - Geometry

Syntax

Syntax:
[ignore, LOD, ignore2] checkVisibility [beg, end]
Parameters:
ignore: Object - object to exclude from calculations
LOD: String - level of details to use. Possible values are: "FIRE", "VIEW", "GEOM", "IFIRE", and Arma 3 logo black.png2.02 "PHYSX"
since Arma 3 logo black.png1.62
ignore2: Object - (Optional, default objNull) second object to exclude from calculations
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:
lineIntersectsWithlineIntersectsSurfaceslineIntersectsObjsintersectterrainIntersectterrainIntersectASLterrainIntersectAtASLlineIntersectscursorObjectcursorTargetdisableRemoteSensors

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
BaerMitUmlaut - c
Posted on Aug 08, 2016 - 22:38 (UTC)
Particles that have blockAIVisibility set to 1 will influence the result, but will not make checkVisibility return 0. Instead an extremly small number will be returned.
Distance, fog, overcast, rain and nighttime have no effect on the result.