---
name: "terrainIntersect"
type: command
status: ok
groups: ["Math - Geometry"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/terrainIntersect
revid: 377407
updated: 2026-01-02T06:45:07Z
---

# terrainIntersect

*Command · Math - Geometry · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.62*

## Description

Checks for intersection of terrain between two AGL positions. Returns [true](../commands/true.md) if intersects with terrain. For ASL variant see [terrainIntersectASL](../commands/terrainIntersectASL.md).

## Syntax

```sqf
terrainIntersect [start, end]
```

**Parameters:**

- `start`: [PositionAGL](../topics/Position.md#positionagl) - start position
- `end`: [PositionAGL](../topics/Position.md#positionagl) - end position

**Returns:** [Boolean](../topics/Boolean.md)

## Examples

### Example 1

```sqf
_intersects = terrainIntersect [getPos player, getPos chopper];
```

### Example 2

```sqf
_intersects = terrainIntersect [position player, position enemy1];
```

## See also

[terrainIntersectAtASL](../commands/terrainIntersectAtASL.md) · [lineIntersectsSurfaces](../commands/lineIntersectsSurfaces.md) · [intersect](../commands/intersect.md) · [lineIntersects](../commands/lineIntersects.md) · [lineIntersectsWith](../commands/lineIntersectsWith.md) · [terrainIntersectASL](../commands/terrainIntersectASL.md) · [lineIntersectsObjs](../commands/lineIntersectsObjs.md) · [checkVisibility](../commands/checkVisibility.md)

## Community notes

**Lou Montana** — 2012-05-31

Please note the difference:
- terrainIntersect
- terrainIntersectASL
- lineIntersect***s***
- lineIntersect***s***With
- lineIntersect***s***Objs
- intersect

---

**Rocket** — 2012-06-01

This command is CPU intensive on the engine, be careful with its use.

---

**Dwarden** — 2012-06-23

This command was changed to ATL and counterpart for ASL was added in build 94049.

<sub>Source: [BI Community Wiki — terrainIntersect](https://community.bistudio.com/wiki/terrainIntersect) (revision 377407).</sub>
