# Add unit movement

Package supports navigation systems out of the box:

* Unity's NavMesh
* [A\* Pathfinding Project](https://travljen.gitbook.io/unit-formation/integrations/a-pathfinding-project/import-package)

Underneath they both use <mark style="color:blue;">**AFormationUnit**</mark> that defines basic unit movement behaviour. You can use any other pathfinding system by implementing either <mark style="color:blue;">**IFormationUnit**</mark> (interface) or <mark style="color:blue;">**AFormationUnit**</mark> (abstract class with some basic behaviour).

To use **Unity's NavMesh** follow the next steps.

**Steps to setup:**

1. Open your unit prefab
2. If you do not have it yet, add **NavMeshAgent** component to your unit game object that will be controlled for movement.
3. Then use the provided <mark style="color:blue;">**FormationUnit**</mark> component and enable or disable built-in rotation capabilities after unit has reached it's formation position.
4. Save unit prefab.

<figure><img src="https://373113018-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO5oY9g3h48cclwOChrGD%2Fuploads%2FBDWiW523TEkpixBbxb0i%2Fimage.png?alt=media&#x26;token=4646db55-6153-48a9-8f30-b4ba19196d1b" alt="" width="563"><figcaption><p>Formation Unit component</p></figcaption></figure>

That is it! With navigation and <mark style="color:blue;">**FormationUnit**</mark> component you should be able to control your unit's movement.
