terrainIntersectASL: Difference between revisions
Jump to navigation
Jump to search
m (Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma2oa |= Game name |1.61|= Game version __________________...") |
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9]) *= * <code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
||
(60 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma2oa |= | |game1= arma2oa | ||
|version1= 1.62 | |||
|1. | |game2= tkoh | ||
|version2= 1.00 | |||
| | |game3= arma3 | ||
|version3= 0.50 | |||
| | |gr1= Math - Geometry | ||
| | |descr= Checks for intersection of terrain between two ASL positions. Returns [[true]] if intersects with terrain. | ||
For AGL variant, see [[terrainIntersect]]. | |||
| [[ | |s1= [[terrainIntersectASL]] [start, end] | ||
|p1= start: [[Array]] format [[Position#PositionASL|PositionASL]] - start position | |||
| [[ | |p2= end: [[Array]] format [[Position#PositionASL|PositionASL]] - end position | ||
|r1= [[Boolean]] | |||
|x1= <sqf>_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];</sqf> | |||
< | |||
< | |x2= <sqf>_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];</sqf> | ||
< | |||
|seealso= [[terrainIntersectAtASL]] [[lineIntersectsSurfaces]] [[intersect]] [[lineIntersects]] [[lineIntersectsWith]] [[terrainIntersect]] [[lineIntersectsObjs]] [[checkVisibility]] | |||
}} | |||
{{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= bloodwyn1756 | |||
|timestamp= 20190302202900 | |||
|text= If one of the two positions is below sea level, the command always returns true. | |||
}} |
Latest revision as of 10:38, 13 May 2022
Description
- Description:
- Checks for intersection of terrain between two ASL positions. Returns true if intersects with terrain. For AGL variant, see terrainIntersect.
- Groups:
- Math - Geometry
Syntax
- Syntax:
- terrainIntersectASL [start, end]
- Parameters:
- start: Array format PositionASL - start position
- end: Array format PositionASL - end position
- Return Value:
- Boolean
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- terrainIntersectAtASL 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
- 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 Mar 02, 2019 - 20:29 (UTC)
- If one of the two positions is below sea level, the command always returns true.