In getting to the nitty-gritty of the course, I’ve discovered just how easy it is to use Unitys navmesh system to help assist in getting a player character to intelligently move around in their virtual environment.
Before getting to the actual moving, one needs to ‘bake’ the area the character will be moving around in. In our case, we have a floor collider to select, then go into AI/Navigation, and select bake.
While this looks done, the player seems to walk through the cabinets.
We can actually include them in the baking by changing them to ‘static’ and then rebaking the navmesh.
And that’s it! Your player now intelligently picks the best path to where you’re pointing as well as avoids whatever cabinet or element that’s blocking the way!