- Home /
The question is answered, right answer was accepted
Nav mesh holes with terrain
Hello.
I'm currently having troublewith the nav mesh on uneven terrain. I have a lake on the scene, with a slight slope. The nav mesh for lake is riddled with holes, seemingly unrelated to max slope or step height.
Enemies who happen to spawn on top of any of those holes become unable to move, as none of their NavMesh functions can be called.
Silly question, but are those actually holes or just the water mesh poking through the Nav$$anonymous$$esh ? If that would be the case and the Agents were to simply spawn too far above the Nav$$anonymous$$esh then disabling and enabling them might make them "snap" onto the Nav$$anonymous$$esh below, as long as it's not too far away.
Removing the water unfortunately produces the same result.
Answer by Fa6ex · Aug 13, 2019 at 04:07 PM
Alright, I feel pretty silly now. This was nothing more than a visual bug, after all. The reason why the enemies wouldn't move was because the GameObjects would spawn above the nav mesh, which prevented Unity from creating the Agent due to "not being close enough to the mesh".
@ShadoX , you were right, after all. Thank you for answering.