Chapter 5. Getting Around – Pathfinding and AI
In the previous chapter, we learned about camera and lighting effects. We added a skybox, lights, and shadows to our Tank Battle game. We created lightmaps to make our scene dynamic. We took a look at cookies by giving our tank headlights. We also took a look at projectors by creating a blob shadow for the tank. A turbo boost was also created for the tank. By adjusting the viewing angle of the camera, we were able to make the tank look as if it is going much faster than it really is. When we finished, we had a dynamic and exciting-looking scene.
This chapter is all about the enemy. No longer will the player be able to just sit in one place to gather points. We will be adding an enemy tank to the game. By using Unity's NavMesh system, the tank will be able to do pathfinding and chase the player. Once found, the tanks will shoot and reduce the player's score.
In this chapter, we will be covering the following topics...