- Home /
Unity creates unreachable navmesh. How can I remove it?
When generating NavMesh in unity I have blocks/cubes that are solid. My expectation would be that navmesh go around these cubes. But instead navmesh is generated inside of them.
When I spawn enemies I generate random vector position within a sphere and check with NavMesh.SamplePosition if this is a valid spot on the navmesh. However this can spawn enemies within these cubes.
Am I missing something? Is this how it should work.
Answer by MikeTheMonster · Jan 26 at 07:02 PM
A little late, but you should simply select the unreachable areas and set their Navigation Area (under Object tab) from walkable to not walkable.
Your answer
![](https://koobas.hobune.stream/wayback/20220613003254im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Navmesh problem with SpawnSystem 0 Answers
Procedural generation of blocks 0 Answers
Navigate objects based on 2DTexture informations? 0 Answers
Navmesh Generation 1 Answer
Navmesh on all sides of an object? 0 Answers