terrainIntersectASL: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<dt class="note">'''\[\[.*\]\]'''" to "<dt class="note">$1") |
Lou Montana (talk | contribs) m (Fix username deletion mistake) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Checks for intersection of terrain between two ASL positions. Returns [[true]] if intersects with terrain. For AGL variant, see [[terrainIntersect]]|DESCRIPTION= | | Checks for intersection of terrain between two ASL positions. Returns [[true]] if intersects with terrain. | ||
For AGL variant, see [[terrainIntersect]]. |DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[terrainIntersectASL]] [pos1, pos2] |SYNTAX= | ||
|p1= [pos1, pos2]: [[Array]]|PARAMETER1= | |p1= [pos1, pos2]: [[Array]]|PARAMETER1= | ||
|p2= pos1: [[Array]] - start position in format [[PositionASL]]|PARAMETER2= | |p2= pos1: [[Array]] - start position in format [[PositionASL]]|PARAMETER2= | ||
|p3= pos2: [[Array]] - end position in format [[PositionASL]]|PARAMETER3= | |p3= pos2: [[Array]] - end position in format [[PositionASL]]|PARAMETER3= | ||
Line 20: | Line 23: | ||
|x1= <code>_intersects = [[terrainIntersectASL]] [<nowiki/>[[getPosASL]] [[player]], [[getPosASL]] chopper];</code> |EXAMPLE1= | |x1= <code>_intersects = [[terrainIntersectASL]] [<nowiki/>[[getPosASL]] [[player]], [[getPosASL]] chopper];</code> |EXAMPLE1= | ||
|x2= <code>_intersects = [[terrainIntersectASL]] [<nowiki/>[[eyePos]] [[player]], [[eyePos]] enemy1];</code> |EXAMPLE2= | |x2= <code>_intersects = [[terrainIntersectASL]] [<nowiki/>[[eyePos]] [[player]], [[eyePos]] enemy1];</code> |EXAMPLE2= | ||
Line 25: | Line 29: | ||
|[[terrainIntersectAtASL]], [[lineIntersectsSurfaces]], [[intersect]], [[lineIntersects]], [[lineIntersectsWith]], [[terrainIntersect]], [[lineIntersectsObjs]], [[checkVisibility]] |SEEALSO= | |[[terrainIntersectAtASL]], [[lineIntersectsSurfaces]], [[intersect]], [[lineIntersects]], [[lineIntersectsWith]], [[terrainIntersect]], [[lineIntersectsObjs]], [[checkVisibility]] |SEEALSO= | ||
}} | }} | ||
Line 33: | Line 36: | ||
<dd class="notedate">Posted on may 31, 2012 - 10:40 (CEST) | <dd class="notedate">Posted on may 31, 2012 - 10:40 (CEST) | ||
<dt class="note">[[]] | <dt class="note">[[User:Lou Montana|Lou Montana]] | ||
<dd class="note">Please note the difference : | <dd class="note">Please note the difference : | ||
*terrainIntersect | * terrainIntersect | ||
*terrainIntersectASL | * terrainIntersectASL | ||
*lineIntersect'''''s''''' | * lineIntersect'''''s''''' | ||
*lineIntersect'''''s'''''With | * lineIntersect'''''s'''''With | ||
*lineIntersect'''''s'''''Objs | * lineIntersect'''''s'''''Objs | ||
*intersect | * intersect | ||
<dd class="notedate">Posted on may 31, 2012 - 10:40 (CEST) | <dd class="notedate">Posted on may 31, 2012 - 10:40 (CEST) | ||
<dt class="note">[[]] | <dt class="note">[[User:Rocket|Rocket]] | ||
<dd class="note">This command is CPU intensive on the engine, be careful with its use. | <dd class="note">This command is CPU intensive on the engine, be careful with its use. | ||
<dd class="notedate">Posted on March 2, 2019 - 20:29 (UTC)</dd> | |||
<dt class="note">[[User:bloodwyn1756|bloodwyn1756]]</dt> | |||
<dd class="note"> | |||
If one of the two positions is below sea level, the command always returns true. | |||
</dd> | |||
<!-- Note Section END --> | <!-- Note Section END --> | ||
Line 51: | Line 60: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 18:38, 19 May 2020
Description
- Description:
- Checks for intersection of terrain between two ASL positions. Returns true if intersects with terrain. For AGL variant, see terrainIntersect.
- Groups:
- Uncategorised
Syntax
- Syntax:
- terrainIntersectASL [pos1, pos2]
- Parameters:
- [pos1, pos2]: Array
- pos1: Array - start position in format PositionASL
- pos2: Array - end position in format PositionASL
- Return Value:
- Boolean
Examples
- Example 1:
_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];
- Example 2:
_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];
Additional Information
- See also:
- terrainIntersectAtASLlineIntersectsSurfacesintersectlineIntersectslineIntersectsWithterrainIntersectlineIntersectsObjscheckVisibility
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
- Posted on may 31, 2012 - 10:40 (CEST)
- Lou Montana
- Please note the difference :
- terrainIntersect
- terrainIntersectASL
- lineIntersects
- lineIntersectsWith
- lineIntersectsObjs
- intersect
- Posted on may 31, 2012 - 10:40 (CEST)
- Rocket
- This command is CPU intensive on the engine, be careful with its use.
- Posted on March 2, 2019 - 20:29 (UTC)
- bloodwyn1756
- If one of the two positions is below sea level, the command always returns true.