The first step is to modify the level to support automated navigation. In the original game, all the moving objects (the tanks) are controlled by the user, so there is no need for pathfinding. Now that we want to add AI, we need to have a world representation through which the AI can move. Luckily, this process is very easy, thanks to NavMeshes.
Adding automated navigation
Creating the NavMesh
To do this, implement the following:
- Open the Navigation windows (Window | AI | Navigation) and look at the NavMesh generation parameters.
In this case, NavMesh generation is quite easy: we are only interested in moving around on the ground surface plane, so there are no jumps, no links, and no slopes we need to care of.
- The only...