# sm.pathfinder.getPath

Find a path

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.pathfinder.getPath( character, destination, groundPos?, abilities?, costs? )
```

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

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `character` | [Character](../Game-Script-Environment/Userdata/Character.md) | The character to find path for |
| `destination` | [Vec3](../Game-Script-Environment/Userdata/Vec3.md) | The path destination |
| `groundPos` *(optional)* | boolean | If the destination is ground level (ignored if nav mesh is used) (Defaults to true) |
| `abilities` *(optional)* | table | Table of actor abilities \{ canWalk=boolean, canSwim=boolean \}. Defaults to character abilities. |
| `costs` *(optional)* | table | Table of traverse area costs [1-10] \{ ground=number, water=number, chemicals=number, oil=number, lava=number \}. Defaults to default costs. |

**Returns:**

| Type | Description |
| --- | --- |
| table | The path as table of PathNodes |
