How to update Dynamic NavMesh on Moving Platform?

I have this configuration:

Project Settings → Engine - Navigation Mesh → Runtime → Runtime Generatnion → Dynamic

To the actor i added:
-NavModifier (Area Class → NavAreaDefault)

But with this configuration NavMesh is not updated ON Moving Platform.

Any way to get Dynamic NavMesh to be recalculated on Moving Platform?

Thank you so much!!

2 Likes

The runtime generation is only useful for when obstructing objects inside of the volume move or change. So, an example would be if a door opened, then a new path would be set.

I do not think Nav Mesh Bounds can move because they wouldn’t update in time. I could be wrong, but it certainly appears that it takes a second or two for Unreal to create all the new paths when a Bound is moved or resized.

You may just need to make it large enough to encompass all of what you need.

I welcome someone to prove me wrong. But again, it seems impractical because it does take a second or two for Unreal to recalculate routes.

If you do not want to do this (it could be very expensive, unsure though), you could always create your own pathfinding/patrols manually with movement nodes (i.e. AI_MOVE_TO).

1 Like

Yes, it is possible it take a few seconds to recalculate the mesh…
But in the other hand the NPC can go in the same path as the player.
So, i want test it then i decide if worth it.

I see that in Unity it can be done relatively easy.

I also found this in Unreal. The video is old (from 4 years ago)…

And the owner explains a little about what he did… But the explanation is too weak for me. I need more details.

Anyway, I hope that Unreal solves it easily (At least like Unity).

Thank you very much for your comment!!

2 Likes

Hey, @Ivan3z , really interesting!

I misunderstood you. I thought you meant if the Nav Mesh’s native/default behavior can do this, which, again, I don’t think it can.

I have no idea what this person did, and they don’t really seem to want to let anyone know!

Maybe you can direct-message this person?

EDIT:

I don’t think this person could have done what they did without doing this. It looks like he “cut a
dynamic hole” instead of creating a dynamic instance. The hole moves, not the mesh. That’s what it appears, anyway. I don’t think the video is possible if the Nav Mesh doesn’t encompass the entire level. What you want is for the Nav Mesh to move, and it’s not actually moving from what I can see.

1 Like

Hi @Leomerya12

Yes, that’s the idea. Just like Unity does.

I understand. I think that’s not what I need then.

It won’t be necessary. I really don’t want to get involved in the development of a feature that I don’t even know if it does works in the case i want to use it.

If Epic engineers didn’t solve this problem maybe it’s better to wait for them to do it.
Just let them know that Unity can and Unreal can’t.
Competition and the free market will do the rest. :smile:

Thank you so much @Leomerya12 :heart:

1 Like

Hi @Leomerya12
Look at this… i think i got it…
I just changed a littel the cell size.

But you are right. The mesh is recalculated all the time. So now just i need evaluate if the cost is worth it…

Best Regards!!

1 Like

Beautiful work!

Feel free to update if you improve the system. I’d love to know!

1 Like

I will.
Now i want to test smart link proxy with the moving platform. It is the second step.
We’ll see what happens.
:heart:

1 Like

Hi @Leomerya12
I have more or less achieved it.
NavLikns don’t work for this… they don’t update dynamically.
I had to improvise my own NavLink.
And my NPCs have no patience… they are in such a hurry that they don’t realize that there is no floor :rofl: :rofl: But sometimes they get it!!

There is still a lot of improvement to be done.
Thank you very much for your help :heart:

1 Like

HA!

Maybe you can add an overlap event to the moving platforms and the surfaces it touches to ensure that the AI has to wait until there is an overlap before attempting to ride or get off the platform?

I wish all of this was easier.

1 Like

It is a good idea. I’ll try it.
Thank you so much!!

Hi @Leomerya12
Take at look at this… I almost have it!!
In this video it happens perfectly. But sometimes it still fails.
I increased complexity with two moving platforms.

I think I’ll soon get the NPC to do the job right 100% of the time.
Thank you very much for your help… it has been very useful!! :heart:

1 Like

This looks SOOOO much better than it did before.

Unreal can do a LOT of things, but there’s still some things it can’t do, so great work on getting creative!

1 Like

Hi @Leomerya12
Yes, it is a physics problem (uniform rectilinear motion) like the ones we did in college.
I don’t understand why Epic didn’t implement it in unreal.

Thank you so much :heart:

1 Like