- Home /
How can I have an enemy be able to fall through a Navmesh?
I'm trying to make an enemy following the player, which the player can lure into a pit. I tried to put a plane over the pit without any collider, and then bake a Navmesh with that plane, but when I do that, the enemy just walks over the gap as if there was a collider was there, even if I give the enemy a Rigidbody. Is there any way to designate a part of Navmesh that the enemy thinks they can walk on, but will fall through if they actually try to walk there?
@Purr25 Have you tried using a trigger in which the event (OnTriggerEnter()) turns off the Nav$$anonymous$$esh agent and the collider? If the AI uses gravity it should fall right through.
The trigger-collider could be a sphere that surrounds the pit.
@Salmjak I followed you suggest and added that triggering the collider at the top of the pit disables the enemy Navmesh, and it worked out. Thanks for the advice!
Your answer
![](https://koobas.hobune.stream/wayback/20220612085415im_/https://answers.unity.com/themes/thub/images/avi.jpg)