# Nav mesh on moving platform?

**URL:** <https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [August 7, 2024, 7:17pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075 "2024-08-07T19:17:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 7, 2024, 7:17pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/1 "2024-08-07T19:17:42Z")

</div>

I’m making an elevator, and my game is click to move, so I need each floors’ navmesh to update to include the elevator platform when it arrives.

I’ve set “runtime generation” in the project settings to “dynamic”, and it works, but it sounds kinda expensive.

I’ve tried “dynamic modifiers only” but it seems to only work for excluding stuff from the navmesh, not including. or I don’t know how to use it properly.

how should I do it?

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 9, 2024, 4:18pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/2 "2024-08-09T16:18:23Z")

</div>

Is this possible even?

I could get away with telling the game to update the navmesh as the elevator platform reaches another floor, but couldn’t find how to do this

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 18, 2024, 7:14pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/3 "2024-08-18T19:14:06Z")

</div>

I’ll bump this one cause it feels like this should be trivial

---

<div class="post-metadata">

**Author:** ![Leomerya12](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/leomerya12/32/926321_2.png) [@Leomerya12](https://forums.unrealengine.com/u/Leomerya12)\
**Post date:** [August 18, 2024, 8:17pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/4 "2024-08-18T20:17:19Z")

</div>

Can you upload screenshots and/or a video of what you’re doing?

I had a similar issue with a train system that I was creating (station platform logic), but I’m not sure how similar my case and solution is to yours.

Just keep in mind that NavMeshes are really not meant to be dynamic. They can be, but when they are, they’re very inflexible. This is for stability, performance, and consistency.

I’ve found that the dynamic NayMesh is not really for movement, but for actors that come in and out of existence (i.e. loading/unloading levels/zones); that way your character doesn’t avoid bumping into phantom objects or fall through floors that no longer exist.

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 19, 2024, 5:26pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/5 "2024-08-19T17:26:10Z")

</div>

sure thing:

my game is top down with a click to move system, which relies on navmeshes.

here’s what happens to the navmesh when the platform moves:

I want to be able to exit the lift platform at any floor and click to move out of it, but as a static runtime generation for nagivation, it only works at the level the navmesh was generated (in this case the lowest floor)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/4/b041bdaf3b508b50260fff83c6733752aca6a011.png)

if I change this to Dynamic, it works all the time, but it also rebuilds the navigation all the time as something moves through the navmesh, which impacts performance, so it’s not ideal.

what I wanted was to rebuild navigation just once when the platform reaches another floor, which would have minimal impact compared to dynamic, but I don’t even know if that can be done.

there’s a “dynamic modifiers only” option, which I thought could do what I want, but I couldn’t find a way to make it work I intend, also not sure if its even for that.

---

<div class="post-metadata">

**Author:** ![Leomerya12](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/leomerya12/32/926321_2.png) [@Leomerya12](https://forums.unrealengine.com/u/Leomerya12)\
**Post date:** [August 19, 2024, 7:26pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/6 "2024-08-19T19:26:35Z")

</div>

> [@fael097](#):
>
> if I change this to Dynamic, it works all the time, but it also rebuilds the navigation all the time as something moves through the navmesh, which impacts performance, so it’s not ideal.
> 
> what I wanted was to rebuild navigation just once when the platform reaches another floor, which would have minimal impact compared to dynamic, but I don’t even know if that can be done.

Yes, you’ve stated this, and I responded.

So, what can you do?

One option is to manually reposition your character off of the lift by setting their location and rotation in the direction of the click (playing an animation walking/running montage with this function). And then once they have overlapped with the static navmesh, you can have it take over (probably with an overlap event).

And/Or

You can check these plugins out (they are free):

[https://www.unrealengine.com/marketplace/en-US/product/customizable-pathfinding](https://www.unrealengine.com/marketplace/en-US/product/customizable-pathfinding)  
[https://www.unrealengine.com/marketplace/en-US/product/don-s-3d-pathfinding-flying-ai](https://www.unrealengine.com/marketplace/en-US/product/don-s-3d-pathfinding-flying-ai)

(It may be too late for you to incorporate these. I don’t know. I haven’t used them, as I generally avoid plugins.)

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 20, 2024, 5:44am UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/7 "2024-08-20T05:44:52Z")

</div>

Yeah plugins aren’t my thing either and I’m too far in navigation to start again

the manual reposition suggestion could work, but that sounds like a lot of trouble for something otherwise simple. I’d also have to do the inverse for when I want to hop onto the platform, and AI wouldn’t be able to follow anyway.

I really think I’m missing something, I mean you can dynamically add barriers to the navmesh without refreshing it entirely all the time, it feels like dynamically adding connections shouldn’t be impossible

---

<div class="post-metadata">

**Author:** ![baobao4435](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/baobao4435/32/950790_2.png) [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Post date:** [August 20, 2024, 4:02pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/8 "2024-08-20T16:02:23Z")

</div>

you can put a invisible mesh at the end of the elevator’s path.set it to ignore everything.but block one thing that doesn’t exist in your scene,for example block vehicle.the navmesh will generate on it.

it was @Ivan3z found the solution.at post 5

> [@How to stop the pawn exactly where I want? (Tick problem in behavior tree services)](https://forums.unrealengine.com/t/how-to-stop-the-pawn-exactly-where-i-want-tick-problem-in-behavior-tree-services/1851298/6):
>
> It has an easy explanation. What I did was “hack the navigation mesh”… I put a collisionless mesh over the hole. Only the vehicle collision is activated. So the path finding system works. The shortest path to get from point A to point B is above the hole. To prevent it from falling into the void, you just have to stop the pawn immediately. And launch it to the other side. The condition is very simple too. From a mathematical point of view it should not fail. float JumpDistance = …

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [August 20, 2024, 5:14pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/9 "2024-08-20T17:14:31Z")

</div>

Brilliant! It worked perfectly. thank you, sir

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [September 19, 2024, 5:14pm UTC](https://forums.unrealengine.com/t/nav-mesh-on-moving-platform/1966075/10 "2024-09-19T17:14:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
