terrainIntersect: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "PositionAGL" to "PositionAGL") |
||
Line 16: | Line 16: | ||
|s1= [[terrainIntersect]] [start, end] | |s1= [[terrainIntersect]] [start, end] | ||
|p1= start: [[Array]] format [[PositionAGL]] - start position | |p1= start: [[Array]] format [[Position#PositionAGL|PositionAGL]] - start position | ||
|p2= end: [[Array]] format [[PositionAGL]] - end position | |p2= end: [[Array]] format [[Position#PositionAGL|PositionAGL]] - end position | ||
|r1= [[Boolean]] | |r1= [[Boolean]] |
Revision as of 16:52, 5 January 2022
Description
- Description:
- Checks for intersection of terrain between two AGL positions. Returns true if intersects with terrain. For ASL variant see terrainIntersectASL.
- Groups:
- Math - Geometry
Syntax
- Syntax:
- terrainIntersect [start, end]
- Parameters:
- start: Array format PositionAGL - start position
- end: Array format PositionAGL - end position
- Return Value:
- Boolean
Examples
- Example 1:
_intersects = terrainIntersect [getPos player, getPos chopper];
- Example 2:
_intersects = terrainIntersect [position player, position enemy1];
Additional Information
- See also:
- terrainIntersectAtASLlineIntersectsSurfacesintersectlineIntersectslineIntersectsWithterrainIntersectASLlineIntersectsObjscheckVisibility
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
- Posted on May 31, 2012 - 10:40 (UTC)
-
Please note the difference:
- terrainIntersect
- terrainIntersectASL
- lineIntersects
- lineIntersectsWith
- lineIntersectsObjs
- intersect
- Posted on Jun 01, 2012 - 15:55 (UTC)
- This command is CPU intensive on the engine, be careful with its use.
- Posted on Jun 23, 2012 - 17:15 (UTC)
- This command was changed to ATL and counterpart for ASL was added in build 94049.