# sm.ai.isReachable

Check if the unit can reach the target position by moving along a path.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.ai.isReachable( unit, position )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.ai.md#isreachable)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `unit` | [Unit](../Game-Script-Environment/Userdata/Unit.md) | The unit. |
| `position` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The target position. |

**Returns:**

| Type | Description |
| --- | --- |
| boolean | Returns true if the position is reachable. |
