# Sandbox.Navigation.NavMesh.CalculatePath

```csharp
NavMeshPath CalculatePath(CalculatePathRequest request)
```

Computes a navigation path between the specified start and target positions on the navmesh.
Uses the same pathfinding algorithm as [Sandbox.NavMeshAgent](/api/Sandbox.NavMeshAgent), taking agent configuration into account if provided.
The result is suitable for direct use with [Sandbox.NavMeshAgent.SetPath](/api/Sandbox.NavMeshAgent/SetPath).
If a complete path cannot be found, the result may indicate an incomplete or failed path.

### Parameters

- `request` (`CalculatePathRequest`)

### Returns

`NavMeshPath`

Declared in [Sandbox.Navigation.NavMesh](/api/Sandbox.Navigation.NavMesh).
Assembly: `Sandbox.Engine`.
