Unfortunately, the game does not support AI, so we need to add the agent by ourselves. To do this, use the following steps:
- We have to identify the player tank. As you can see from the game hierarchy, there is no tank in the scene. In fact, as you should know from your preliminary exploration, the tanks are spawned by the GameManager. The tank model we'll use is actually a prefab called CompleteTank.
- Let's copy the prefab and call it CompleteTankAI.
- Then we need to add the Nav Mesh Agent component to it. This allows the tank to move around on our new NavMesh:
But this is not enough. First, we'll reuse the TankShooting ...