Add unit movement
Quick guide to set up your units with navigation for formation.
Last updated
Quick guide to set up your units with navigation for formation.
Last updated
Package supports navigation systems out of the box:
Unity's NavMesh
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:
Open your unit prefab
If you do not have it yet, add NavMeshAgent component to your unit game object that will be controlled for movement.
Then use the provided FormationUnit component and enable or disable built-in rotation capabilities after unit has reached it's formation position.
Save unit prefab.
That is it! With navigation and FormationUnit component you should be able to control your unit's movement.