We can create objects whose meshes are defined as more expensive for NavMeshAgents to travel across, helping AI-agent behavior be more realistic in terms of choosing faster paths that avoid Water, Mud, and so on.
To create a custom NavMesh Area (we'll pretend it's mud) with a higher travelling cost, do the following:
- In the Navigation panel, reveal the areas by clicking the Areas button. Then, define a new area named Mud with a cost of 2:
- Create a new 3D Cylinder named Cylinder-mud, positioned at (0, -4.9, 0) and scaled to ( ...