Removing Empty Spaces in Navmesh

I am learning how to use navmesh’s now. I have created one and I have a bad guy that chases the player around. So far so good. The problem is there are some spots in the navmesh that are blank. There is no navmesh. I have started to notice that when the player navigates to a spot in the map where there is a gap in the navmesh, the bad guy stops chasing the player. There are some spots where I need to have the bad guy follow but can’t.

This is the outside of a door with a gap in front of it

This is the inside of the same door. The gap is too big and the bad guy cant pass.

Other area besides in a doorway that has missing navmesh coverage. The area to the left and right of the steps.

**In summary there are 2 problems that I can’t seem to solve.

  1. Bad guys can’t get past big gaps in the navmesh.

  2. Bad guy will stop following the player when the player enters a gap in the navmesh.**

Navmesh in UE4 (which is using Recast under the hood) is generated with a specific agent radius as one of the parameters. Backing agent radius into the navmesh structure makes it possible to not worry about radii at runtime.
It’s that radius that results in gaps between level collision and navmesh representation.

You can force a point-to-point connection on navmesh by using NavLinkProxy actors. Or you can modify level collision in places where there’s no navmesh but you think AI should be able to freely traverse it.

Cheers,

–mieszko

Thank you for this answer. I can add collision in some areas to prevent the player or AI from entering that spot. But the spot in between doors on the buildings I could not get to go completely away. The biggest problem is that as soon as the player steps in the doorway the AI stops chasing the player I’m guessing because they momentarily stepped out of the navmesh. Would a NavLinkProxy help with that? I tried using one but it didn’t seem to work. Not sure if I set it up right or not. I did read its more for jumping down and doesn’t work for going up.

I actually found the solution. The AI step height and walk slope were too low. I increased them and now the AI does not stop when I run pas the NavLinkProxy.