Point & to Move in Unity — Part 4: Fix Player Clipping Objects

Making player avoid obstacles

Rusben Guzman
2 min readNov 4, 2021

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.

--

--

Rusben Guzman
Rusben Guzman

Written by Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.

No responses yet