🚢Add unit movement

Quick guide to set up your units with navigation for formation.

Package supports navigation systems out of the box:

Underneath they both use AFormationUnit that defines basic unit movement behaviour. You can use any other pathfinding system by implementing either IFormationUnit (interface) or AFormationUnit (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 FormationUnit component and enable or disable built-in rotation capabilities after unit has reached it's formation position.

  4. Save unit prefab.

Formation Unit component

That is it! With navigation and FormationUnit component you should be able to control your unit's movement.

Last updated