{"name":"terrainIntersectASL","operator":null,"title":"terrainIntersectASL","type":"command","url":"https://community.bistudio.com/wiki/terrainIntersectASL","revid":377458,"updated":"2026-01-02T06:47:25Z","groups":["Math - Geometry"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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]","since":null,"effect":null,"exec":null,"params":[{"name":"start","type":"PositionASL","optional":false,"default":null,"description":"start position","types":["PositionASL"],"since":null,"text":"start: PositionASL - start position"},{"name":"end","type":"PositionASL","optional":false,"default":null,"description":"end position","types":["PositionASL"],"since":null,"text":"end: PositionASL - end position"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"unary","operator":null,"left":null,"right":{"text":"[start, end]","types":["Array"]}}],"examples":[{"text":"```sqf\n_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];\n```","code":["_intersects = terrainIntersectASL [getPosASL player, getPosASL chopper];"]},{"text":"```sqf\n_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];\n```","code":["_intersects = terrainIntersectASL [eyePos player, eyePos enemy1];"]}],"multiplayer":null,"problems":null,"aliases":[],"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- 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."}],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Math - Geometry","Introduced with Arma 2: Operation Arrowhead version 1.62","Scripting Commands","Take On Helicopters: Scripting Commands"]}