Why ABPath Paths Through Unwalkable Obstacles?

Hi there!

The building shown here has a RecastNavMeshModifier set to Always Include, Collider, and Unwalkable Surface.

It generally works – you can see the navmesh excludes the building as a walkable area. However, NPCs sometimes plot a path through the building, as shown in this screenshot. I am using ABPath.Construct.

What causes this and how do I eliminate it?

Looks like your agent has a navmesh cut attached to it. That will cause it to constantly try to avoid itself, leading to strange movement.

That’s true! Thanks, Aron. Is there a component I may add to an agent to prevent agent to agent collisions when paths are generated? I could enable the cut when agents are idle, perhaps. There is so much depth and complexity to pathfinding – I’m still learning!

I believe you’re looking for RVO. You can add an RVO Simulator to your scene and an RVO Controller to your agents to have them try and avoid collisions. (If your agents are FollowerEntity, you won’t need to add an RVO Controller, there’s a tickbox for it instead)

I removed NavMesh cuts and it still happens. I am guessing a funnel modifier + simple smooth modifier might somehow contribute to this output.

It was the simple smooth modifier.

1 Like