Problem with Navmesh bake for buildings

Hi,

I have a weird problem with my Navmesh. When I added buildings from Polygon Knights asset pack as game objects at scene they are not ‘seen’ by my nav mesh and are not baked. (see screenshot 1 and 2)
What is weird, when I add trees as elements of terrain, they are bake.

Do you know why? And how to solve it?

You’ll find this issue from time to time with a lot of assets. There are a couple of remedies.
For starters, make sure that all objects like buildings and trees are marked as static (upper right hand corner of the inspector. There’s a dropdown, make sure Navigation is checked.
With the object selected, go to the Navigation window and the object pane, and check the Navigation Static box, and change the dropdown there to “Not Walkable”
image

Thanks a lot! That works!

However I do not fully understand it. What if I wanted to create a pile of stone, that player can walk on, but also the can move them (e.g. with a tool), is it possible with this approach?

That’s a bit more complicated. There is an alternate NavMesh schema found here: https://github.com/Unity-Technologies/NavMeshComponents It’s not well documented, but the idea is that instead of prebaking the surface, you attach the surface to a gameobject and bake it dynamically. It doesn’t play well with the trees in terrains, but it does give you flexibility in other areas.

thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.