Punched through this course today!
I fixed the dancing guards problem from yesterday by changing the settings for auto-braking and stopping distance. It seems like it’s not an uncommon problem when working with NavMeshAgents — in fact, it may be required so multiple objects don’t obstruct others from their pathing. This was really important because I started the day with the coin distraction mechanic — if all three guards arrive at the coin’s location and begin to dance, I’m not sure their boss would be too happy!
A portion of today felt familiar to part of the 2D course. Particularly, when working with the security camera’s cone detection and the various triggers for the VO lines, camera transitions, and cutscenes reminded me of working with collisions between the spaceships of the space shooter game. Between the challenge and challenge review videos I was going through a mental checklist: Did I set the collider to Is Trigger? Did I write the OnTriggerEnter method? Did I add a Rigidbody? More often than not, I had forgotten to add the Rigidbody. Probably because I thought I had already put one on our player character.
The last part of today’s work focused on generating singleton patterns for things like the game and audio managers. As explained in the course, this is the first time most beginners are working with the concept, so it’s still a bit nebulous to me. From what I can discern, singletons are extremely useful in organizing and streamlining the development process. I’m eager to learn more once I finish this course!
Biggest takeaways from the day: When you have a lot of moving parts, it’s a good habit to streamline the coding process when you can. It will make it so much easier to null check, perform script communication, implement modular scripts, etc.