Posted August 06, 2023 by Siderun
For week 3's tutorial I altered my terrain from the previous tutorial to add a NavMesh. A NavMesh sits on the surface of an object (such as a terrain) and allows Artificial Intelligence to navigate on and around it. I then made a simple capsule object and gave it the NavMesh AI.
After creating my NavMesh, I had to create a moving obstacle so that the AI would avoid it. Initially, my obstacle went from on place to another instantly, without moving smoothly. I changed it so that the movement is more gradual.
I then added an enemy to the game (another capsule). I programmed it to spawn where I click, and chase after the capsule. I made the decision to colour-code the capsules: blue for the player and red for the enemies. The last part the tutorial suggests using my Blender model, but I decided to leave it for the self-study.