{"name":"terrainIntersectASL","title":"terrainIntersectASL","type":"command","url":"https://community.bistudio.com/wiki/terrainIntersectASL","revid":377458,"updated":"2026-01-02T06:47:25Z","groups":["Math - Geometry"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"Checks for intersection of terrain between two ASL positions. Returns true if intersects with terrain.\nFor AGL variant, see terrainIntersect.","syntaxes":[{"syntax":"terrainIntersectASL [start, end]","params":[{"name":"start","type":"PositionASL","description":"start position","type_expr":"PositionASL"},{"name":"end","type":"PositionASL","description":"end position","type_expr":"PositionASL"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"[start, end]"}}],"examples":[{"code":["_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];"]},{"code":["_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];"]}],"see_also":["terrainIntersectAtASL","lineIntersectsSurfaces","intersect","lineIntersects","lineIntersectsWith","terrainIntersect","lineIntersectsObjs","checkVisibility"],"notes":[{"user":"Lou Montana","date":"2012-05-31T10:40:00Z","text":"Please note the difference:\n\n- terrainIntersect\n- terrainIntersectASL\n- lineIntersect***s***\n- lineIntersect***s***With\n- lineIntersect***s***Objs\n- intersect"},{"user":"Rocket","date":"2012-06-01T15:55:00Z","text":"This command is CPU intensive on the engine, be careful with its use."},{"user":"bloodwyn1756","date":"2019-03-02T20:29:00Z","text":"If one of the two positions is below sea level, the command always returns true."}]}