Simple question: How to make a mesh non - walkable

I asked a similar question before but perhaps it wasnt clear, here I’ve included a picture so it should make it more clear what I want to achieve

From the OP in ‘new Navigation package in town’ thread

I’m trying to do something that was very easy to do with the old package, thus since the new one has parity it should be achievable but I can’t see how. I’ve searched online but no luck coming up with an answer.

i.e. designate a mesh as non-walkable, like the rock in the middle here, I dont want the navmesh to be on it, but I still want the navmesh to go around it.

I could use a navmesh obstacle which is messy and gives inferior results, as it doesnt use the meshes shape

cheers

EDIT: Actually heres a better example from unitys own tutorial.
See video #2.
The navmesh actually generates on top of the wall!!!, something you don’t want, you want to walk around the walls not on top of them

Im beginning to think maybe its not possible with the new navmesh system as easy as it was with the old system, its a pity as the new system seems to generate quicker and results in a better navmesh

While it’s true the obstacle doesn’t use the rock’s shape, you could still position one slightly above ground level so it doesn’t affect the ground at all. All you want is the ara on top of the rock to not be included in the navmesh generation, right? As long as the NavMeshObstacle fully encloses the surface area you want to be unwalkable, it doesn’t need to be the exact shape. With complex shapes you might need multiple NavMeshObstacles. I don’t think your shape requires more then two flattened cubes with the “carve” option turned on.

Maybe try using the NavMeshModifierVolume?

Here I use it on top of a box to make sure that it’s not walkable.

Add NavMesh Obstacle Component → then tick “Carve”

It will auto correct the NavMesh