checkVisibility: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
|gr1= Math - Geometry | |gr1= Math - Geometry | ||
|descr= Checks if one position is visible from another position and how much. | |descr= {{{!}} class="wikitable float-right" | ||
! style="width: 50%" {{!}} Affected by | |||
! Not affected by | |||
{{!}}- | |||
{{!}} | |||
* [[getTerrainGrid|terrain grid]] | |||
* obstacles | |||
* particles<br><span style="font-size: .9em">(with <syntaxhighlight lang="cpp" inline>blockAIVisibility = 1</syntaxhighlight>)</span> | |||
{{!}} | |||
* [[time|daylight]] | |||
* [[distance]] | |||
* [[overcast]] | |||
* [[fog]] | |||
{{!}}} | |||
Checks if one position is visible from another position and how much. | |||
{{Feature|informative|Particles that have {{hl|blockAIVisibility}} set to 1 will influence the result, but will never make [[checkVisibility]] return 0; an extremely small number will be returned instead.}} | |||
|s1= [ignore, LOD, ignore2] [[checkVisibility]] [beg, end] | |s1= [ignore, LOD, ignore2] [[checkVisibility]] [beg, end] | ||
Line 14: | Line 28: | ||
|p1= ignore: [[Object]] - object to exclude from calculations | |p1= 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"}} | |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= ignore2: [[Object]] - (Optional, default [[objNull]]) second object to exclude from calculations | |p3= ignore2: [[Object]] - (Optional, default [[objNull]]) second object to exclude from calculations | ||
Line 25: | Line 39: | ||
|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. | ||
|x1= < | |x1= <sqf>private _canSee = [objNull, "VIEW"] checkVisibility [eyePos player, eyePos unit1];</sqf> | ||
|seealso= [[lineIntersectsWith]] [[lineIntersectsSurfaces]] [[lineIntersectsObjs]] [[intersect]] [[terrainIntersect]] [[terrainIntersectASL]] [[terrainIntersectAtASL]] [[lineIntersects]] [[cursorObject]] [[cursorTarget]] [[disableRemoteSensors]] | |seealso= [[lineIntersectsWith]] [[lineIntersectsSurfaces]] [[lineIntersectsObjs]] [[intersect]] [[terrainIntersect]] [[terrainIntersectASL]] [[terrainIntersectAtASL]] [[lineIntersects]] [[cursorObject]] [[cursorTarget]] [[disableRemoteSensors]] | ||
}} | }} |
Latest revision as of 12:25, 10 April 2023
Description
- Description:
-
Affected by Not affected by - terrain grid
- obstacles
- particles
(withblockAIVisibility = 1
)
Checks if one position is visible from another position and how much.
- 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 2.02 "PHYSX"
- since 1.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:
Additional Information
- See also:
- lineIntersectsWith lineIntersectsSurfaces lineIntersectsObjs intersect terrainIntersect terrainIntersectASL terrainIntersectAtASL lineIntersects cursorObject cursorTarget disableRemoteSensors
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