NPCs Completely ignore navigation costs assigned to a landscape spline mesh.

I created a landscape spline to mark out a path, then assigned a mesh to the spline, and added a NavArea Class blueprint to it, with 0 cost.

My hope was that this will ensure that NPCs would prefer using the path (cyan color on screenshot) instead of running through the landscape, however that isn’t the case.

Any suggestions on how could it be possible for them to create a path and dynamically assign navigation preference to it?

I do not want to manually use Nav modifier volumes on paths and roads. I was hoping that I could set the default NavMeshBounds Volume cost to a higher cost and maybe that would entice that AI to choose my path as it has 0 cost, but that doesn’t seem like a possibility. This is the first time I am trying my hand at pathfinding and navigation, and there is a good chance the answer is gonna be obvious, but I cant find too much information on the topic and am completely stuck.

Could someone please tell me what I am doing wrong, and give tips on how to achieve the desired results.





ck.

1 Like

You would need the make the surrounding terrain have a higher cost than the path. That would incentivize the AI to take the cheaper route.

1 Like

That’s what I have trouble with, the surrounding terrain currently has the cost assigned by, the NavMeshBounds volume, which I cant overwrite, or change the default cost of. The base cost is set to 1 as default. I changed my road to have a cost of 0, which is lower, but the ai still ignores it.

I also tried to add a nav modifier directly to the navmesh volume to raise the cost:


but i doesn’t seem to affect anything.

Also, If i physically drag in a nav modifier volume, around the path, it will overwrite the path as well, since it is part of the landscape, and the areaclass is directly assigned to the mesh that makes up the road

Edit: I tested what happens if I put down a Nav modifier volume in the way of the npc’s shortest route (straight), and set the cost to 100000. The npc still runs right through it.