# NavMesh Agents

NavMesh Agents is what iMove uses to move the player from place to place automatically or for controlling NPC's.&#x20;

In order for this to work you need to do a few things:

## Step 1 (Add iMove NPC Component)

Make sure you have the [**iMove NPC component**](https://app.gitbook.com/o/3zNtDO9q6U5zD9eiXrAn/s/AXfTdBipbBrJWcQRsEPv/~/changes/14/components/imove-npc) on your player or npc player.

## Step 2 (Check iMove: Is NPC)

If you want your player to be a player and also be able to move like an NPC or agent for getting to places like sitting, walking, etc.. Ensure both isPlayer and isNPC are checked within the iMove component.&#x20;

If you only want your "player" object to be an NPC, the only check isNPC:&#x20;

<div align="left"><figure><img src="/files/2Wz65JoPCF2t9g3QQlB9" alt="" width="186"><figcaption></figcaption></figure></div>

## Step 3 (Bake the NavMesh)

Attach a NavMesh Surface to your terrain and click "Bake".

<div align="left"><figure><img src="/files/axBMJmB6FIO6oeaE745r" alt="" width="469"><figcaption></figcaption></figure></div>

To see whether or not your NavMesh is baked, turn on Gizmos in the scene view. You should see a blue surface covering your terrain.

<figure><img src="/files/4BhcWZK1mQSdob8kHRW9" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://glass-vault-studio.gitbook.io/imove/integrations/navmesh-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
