terrainIntersectAtASL: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Update)
No edit summary
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.68


|1.68|= Game version
|gr1= Math - Geometry
____________________________________________________________________________________________


| Checks for intersection of terrain between two ASL positions. Same as [[terrainIntersectASL]], only returns intersect position instead of [[Boolean]] |= Description
|descr= Checks for intersection of terrain between two ASL positions. Same as [[terrainIntersectASL]] but returns the intersection ASL position.
____________________________________________________________________________________________


| '''terrainIntersectAtASL''' [pos1, pos2] |= Syntax
|s1= [[terrainIntersectAtASL]] [start, end]


|p1= [pos1, pos2]: [[Array]]|= Parameter 1
|p1= start: [[Array]] format [[Position#PositionASL|PositionASL]] - start position
|p2= pos1: [[Array]] - start position in format [[PositionASL]]|= Parameter 2
|p3= pos2: [[Array]] - end position in format [[PositionASL]]|= Parameter 3


| [[Array]] - intersect position in format [[PositionASL]] |= Return value
|p2= end: [[Array]] format [[Position#PositionASL|PositionASL]] - end position
____________________________________________________________________________________________
 
|x1= <code>_posASL = [[terrainIntersectAtASL]] <nowiki>[</nowiki>[[eyePos]] [[player]], [[getPosASL]] chopper];</code> |= Example 1


____________________________________________________________________________________________
|r1= [[Array]] format [[Position#PositionASL|PositionASL]] - intersect position


|[[terrainIntersectASL]], [[lineIntersectsSurfaces]], [[intersect]], [[lineIntersects]], [[lineIntersectsWith]], [[terrainIntersect]], [[lineIntersectsObjs]], [[checkVisibility]] |= See also
|x1= <sqf>_posASL = terrainIntersectAtASL [eyePos player, getPosASL chopper];</sqf>


|seealso= [[terrainIntersectASL]] [[lineIntersectsSurfaces]] [[intersect]] [[lineIntersects]] [[lineIntersectsWith]] [[terrainIntersect]] [[lineIntersectsObjs]] [[checkVisibility]]
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= POLPOX
</dl>
|timestamp= 20231210085523
 
|text= This command will tell you that it finds an intersect if either of argument position is under the sea eg {{hl|[0,0,-10]}} even if there is no clear intersection with a terrain surface between them.
<h3 style="display:none">Bottom Section</h3>
}}
 
 
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 09:55, 10 December 2023

Hover & click on the images for description

Description

Description:
Checks for intersection of terrain between two ASL positions. Same as terrainIntersectASL but returns the intersection ASL position.
Groups:
Math - Geometry

Syntax

Syntax:
terrainIntersectAtASL [start, end]
Parameters:
start: Array format PositionASL - start position
end: Array format PositionASL - end position
Return Value:
Array format PositionASL - intersect position

Examples

Example 1:
_posASL = terrainIntersectAtASL [eyePos player, getPosASL chopper];

Additional Information

See also:
terrainIntersectASL lineIntersectsSurfaces intersect lineIntersects lineIntersectsWith terrainIntersect lineIntersectsObjs checkVisibility

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
POLPOX - c
Posted on Dec 10, 2023 - 08:55 (UTC)
This command will tell you that it finds an intersect if either of argument position is under the sea eg [0,0,-10] even if there is no clear intersection with a terrain surface between them.