Quick answer: Unity NavMesh Modifier Volume changing cost but agents still take shortest path? Cost increase must exceed agent's PathFindingTolerance - check the AreaCost is significantly higher.

Pathfinding through 'avoid' volumes (cost 5) still goes straight through. Cost on 'walkable' is 1; ratio of 5x isn't enough.

Raise the cost dramatically

Avoid volume = 100, walkable = 1. The 100x ratio overcomes pathfinding tolerance.

Verify in NavMesh debug

Window > AI > Navigation > Show NavMesh + Show Area Type. Modifier volume visualized; agents that ignore it indicate cost tuning is needed.

Or use Area Mask

For hard avoidance, mask out the area entirely. Cost-based avoidance is for soft preference; mask is for never-traverse.

“Pathfinding cost is a multiplier. Multipliers need range to matter.”

Build a small AI test scene with cost-modifier volumes. Tune cost values; visualize agent paths. The tuning is qualitative; testing is the only way to know.

Related reading