Point & to Move in Unity — Part 4: Fix Player Clipping Objects
Making player avoid obstacles
Objective: rebake the nav mesh to make the player avoid the obstacles in the map.
First I will leave you the previous articles related to this topic.
Right now we have the player movement functionality ready. But when the player moves to the destination point he just pass through the objects in the map.
To fix this we have to select the objects that we are gonna define as obstacles and check the property static in the inspector.
After that we just have to go to Navigation > Bake, select the option “clear” and select the option “bake” again. You can notice the objects in the map are not highlighted in blue because those are not longer part of the nav mesh.
And that’s it!!! We completed the point and click to move functionality in Unity.