terrainIntersect: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |r1=[[" to " |r1= [[") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 12: | Line 12: | ||
|gr1= Math - Geometry | |gr1= Math - Geometry | ||
|descr= Checks for intersection of terrain between two AGL positions. Returns [[true]] if intersects with terrain. For ASL variant see [[terrainIntersectASL]] | |descr= Checks for intersection of terrain between two AGL positions. Returns [[true]] if intersects with terrain. For ASL variant see [[terrainIntersectASL]]. | ||
|s1= [[terrainIntersect]] [ | |s1= [[terrainIntersect]] [start, end] | ||
|p1= | |p1= start: [[Array]] format [[PositionAGL]] - start position | ||
| | |p2= end: [[Array]] format [[PositionAGL]] - end position | ||
|r1= [[Boolean]] | |r1= [[Boolean]] | ||
|x1= <code>_intersects = [[terrainIntersect]] [<nowiki/>[[getPos]] [[player]], [[getPos]] chopper];</code> | |x1= <code>_intersects = [[terrainIntersect]] [<nowiki/>[[getPos]] [[player]], [[getPos]] chopper];</code> | ||
|x2= <code>_intersects = [[terrainIntersect]] [<nowiki/>[[position]] [[player]], [[position]] enemy1];</code> | |x2= <code>_intersects = [[terrainIntersect]] [<nowiki/>[[position]] [[player]], [[position]] enemy1];</code> | ||
Line 28: | Line 29: | ||
}} | }} | ||
{{Note | |||
|user= Lou Montana | |||
|timestamp= 20120531104000 | |||
|text= Please note the difference: | |||
* terrainIntersect | |||
* terrainIntersectASL | |||
* lineIntersect'''''s''''' | |||
* lineIntersect'''''s'''''With | |||
* lineIntersect'''''s'''''Objs | |||
* intersect | |||
}} | |||
{{Note | |||
|user= Rocket | |||
|timestamp= 20120601155500 | |||
|text= This command is CPU intensive on the engine, be careful with its use. | |||
}} | |||
{{Note | |||
|user= Dwarden | |||
|timestamp= 20120623171500 | |||
|text= This command was changed to ATL and counterpart for ASL was added in build 94049. | |||
}} |
Revision as of 01:45, 25 November 2021
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.