# Navmesh pathfinding with slope and surface costs

**URL:** <https://forums.unrealengine.com/t/navmesh-pathfinding-with-slope-and-surface-costs/472202>\
**Category:** AI\
**Tags:** pathfinding, Navigation, unreal-engine, navmesh, Landscape, question\
**Created:** [September 30, 2020, 9:22pm UTC](https://forums.unrealengine.com/t/navmesh-pathfinding-with-slope-and-surface-costs/472202 "2020-09-30T21:22:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunderbeared](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thunderbeared](https://forums.unrealengine.com/u/Thunderbeared)\
**Post date:** [September 30, 2020, 9:22pm UTC](https://forums.unrealengine.com/t/navmesh-pathfinding-with-slope-and-surface-costs/472202/1 "2020-09-30T21:22:22Z")

</div>

I’d like to have a pathfinding:

- with slope costs so that AI prefers to move flat land before going to climb a hill (most important),
- with surface costs based on a landscape so AI wouldn’t walk into the swamp on their heels unless they don’t have a dry way (less important).

The project:

- is a huge realistic world;
- i’m trying to go blueprint-only;
- the runtime navmesh generating is not necessary for me (might become later, but now i’m making editor widget).

As far as I understand it is only possible to:

- Use navModifiers to set cost for specific volumes (actors) - i can’t afford to place volumes on every slope fragments of a landscape manually.
- Go into the deep programming to override pathfinding/casting - would be heavily time-consuming and frustrating for me.

And it is not possible to:

- tell the navmesh to generate areas with different costs,
- use any kind of external editing for a navmesh,
- place navmodifiers procedurally on the slopes or specific landscape surfaces.

Am i right or are there any other possible solutions?  
Maybe someone did publish a code snippet or a plugin?  
Any workaround ideas?

---

<div class="post-metadata">

**Author:** ![vmc\_petter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vmc\_petter](https://forums.unrealengine.com/u/vmc_petter)\
**Post date:** [January 19, 2024, 2:42am UTC](https://forums.unrealengine.com/t/navmesh-pathfinding-with-slope-and-surface-costs/472202/2 "2024-01-19T02:42:31Z")

</div>

Did you find any way to do this?

I’m also interested in how to modify cost based on surface characteristics such as slope angle, physical material, etc. to make a vehicle find the most efficient path.

Don’t mind writing some C++ code as long as I don’t have to modify and rebuild the engine itself.

---

<div class="post-metadata">

**Author:** ![Mal\_Cher1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mal\_Cher1](https://forums.unrealengine.com/u/Mal_Cher1)\
**Post date:** [May 30, 2025, 12:30pm UTC](https://forums.unrealengine.com/t/navmesh-pathfinding-with-slope-and-surface-costs/472202/3 "2025-05-30T12:30:08Z")

</div>

Still nothing on this topic? I’m trying to find a solution for that for two days already. I had no idea that such basic functionality seems imposible.
