# MoveLocationsInSameAreas(NativeSlice<NavMeshLocation>, NativeSlice<Vector3>, int)

> Translates a series of NavMesh locations to other positions without losing contact with the surface, given one common area filter for all of them.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Experimental.AI](/engine/6000.5/script-reference/unityengine/experimental/ai.md)
* **Assembly:** UnityEngine.AIModule

> **Warning:**
>
> **Deprecated.** The experimental NavMeshQuery struct has been deprecated. Use NavWorld instead.

```csharp
public void MoveLocationsInSameAreas(NativeSlice<NavMeshLocation> locations, NativeSlice<Vector3> targets, int areaMask = -1)
```

### Parameters

**** (\[NativeSlice\<NavMeshLocation>]\(/engine/6000.5/script-reference/unity/collections/nativeslice1)): Array of positions to be moved across the NavMesh surface. At the end of the method call this array contains the resulting locations.**** (\[NativeSlice\<Vector3>]\(/engine/6000.5/script-reference/unity/collections/nativeslice1)): World positions you want the agent to reach when moving to each of the locations.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Filters for the areas which can be traversed during the movement to each of the locations.

### Remarks

Does the exact same thing as [NavMeshQuery.MoveLocations](/engine/6000.5/script-reference/unityengine/experimental/ai/navmeshquery/movelocations.md) only it applies the same area filter to all the movements.

Additional Resources: [NavMeshQuery.MoveLocation](/engine/6000.5/script-reference/unityengine/experimental/ai/navmeshquery/movelocation.md), [NavMeshLocation](/engine/6000.5/script-reference/unityengine/experimental/ai/navmeshlocation.md)
