# Follow-up to \[Suboptimal Paths generated on somewhat bumpy Landscape Terrain in WP\] 

**URL:** <https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [September 25, 2026, 8:28am UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846 "2026-09-25T08:28:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 25, 2026, 8:28am UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846/1 "2026-09-25T08:28:50Z")

</div>

This is a follow-up to the following post:

[Suboptimal Paths generated on somewhat bumpy Landscape Terrain in [Content removed]

The engineer handling this issue created a sample project where

・Cell Size is as small as it can be

・Agent Max Step Height is made pretty big

but even with these two parameters adjusted as such, we end up with sub-optimal paths generated on the ​navmesh.

 ![NavMeshSettings.png.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/1/78184f7b23e67872c2661d8a0472742ea7861271.png)

**Wrt Adjusting Cell Size and Cell Height (especially Height)**

Setting these to extremely small values did make the issue happen less often. However, it still reproduced in some areas, so I don’t think it fixes the root cause.

Also, the NavMesh in this project is generated dynamically, so making these values very small would cost too much performance.

**Wrt Changing Agent Max Step Height**

I’m using 200.0 cm, which is far larger than the height difference at the edges, and the issue still reproduces.

~~~~

I’ve built a repro project that uses the same settings as the actual project, and I’m sending it with this message. Please take a look.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [September 25, 2026, 8:28am UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846/2 "2026-09-25T08:28:53Z")

</div>

**再現手順**  
Attaching a sample project with the following Nav Mesh Settings:

・Cell Size - 10

・Cell Height - 10

・Max Agent Step Height - 800​

Open the project in 5.7 (5.8 may also work) via Visual Studio and press PIE.

---

<div class="post-metadata">

**Author:** ![James.Keeling](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James.Keeling](https://forums.unrealengine.com/u/James.Keeling)\
**Post date:** [September 28, 2026, 3:12pm UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846/3 "2026-09-28T15:12:17Z")

</div>

I am downloading the project now. Just to make sure I am using the same version, are you building from the latest in 5.7 release or have you swapped to 5.8?

-James

---

<div class="post-metadata">

**Author:** ![James.Keeling](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@James.Keeling](https://forums.unrealengine.com/u/James.Keeling)\
**Post date:** [October 8, 2026, 8:07pm UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846/4 "2026-10-08T20:07:15Z")

</div>

Thank you for the repro. I see the same behaviour in 5.7 and in our latest engine code: the path bends on the vertex where four tiles meet instead of running straight through the neighbouring tile. This is the edge midpoint behaviour from my first reply, not the tile cracks I described later. If the project was to showcase the cracks, could you send me any locations that I should look at in closer detail?

Detour never links diagonal tiles, so the path has to pass through one of the two tiles beside the corner, and A\* chooses between them by measuring from the midpoint of each shared border edge. On smooth terrain a tile border keeps very few vertices, so with TileSizeUU=8000 a single border edge can cover much of the 80 m side, and its midpoint can be far from where the straight line crosses. A\* can then pick the tile the straight line does not pass through, and string pulling bends the path at the shared corner. Smaller cells add some split points along the border, which is why they reduced it without removing it.

We described a similar effect on the forums some time ago: [https://forums.unrealengine.com/t/pathfinding-returning-suboptimal-paths/371206](https://forums.unrealengine.com/t/pathfinding-returning-suboptimal-paths/371206)

My recommendation is to post-process the found path with navmesh raycasts and drop any point the path can see past. Your ARecastNavMesh subclass can do this by wrapping the engine search through FindPathImplementation, which covers both FindPathToLocationSynchronously and AIController MoveTo. Note that the raycast ignores area costs, so a shortcut can cut through high cost areas.

Let me know if that approach works out for you.

-James

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [October 7, 2026, 1:22am UTC](https://forums.unrealengine.com/t/follow-up-to-suboptimal-paths-generated-on-somewhat-bumpy-landscape-terrain-in-wp/2851846/5 "2026-10-07T01:22:46Z")

</div>

Hi James,

Sorry for the extremely late response -\> we’re building from 5.7 release
