Pathfinding in moving ship/NavMesh

How to have AI pawns navigate a moving ship, vehicle, platform, whatever, i.e. where the NavMesh would continuously change?

This has been asked many times before, as far back as 2014, none with proper solution:

Is there still, in UE5, no officially implemented solution to this somewhat basic problem?

The only published workaround i’ve found is as described by the “Sea of Thieves” developers for their “Skeleton ships”, where they seem to have a stationary clone of the ship mesh with a baked navmesh, then use it for pathfinding queries, somehow transforming the result, see:

Any further knowledge on how it’s done/integrated?

Could it also work for a NavMesh that’s updated dynamically, e.g. building the ship?

Can it be done without modifying the engine?

4 Likes

It’s 2023 and we’re still facing the same issue. Please keep me posted if there are any updates.

thx

My game has moving objects that characters need to jump on, climb, and move on top of. It is a top-down style game with multiple selectable characters that you click to move, each using AI movement methods. The objects that these Characters are on top of move all across the map, so I assume it is similar to the Sea of Thieves situation. Therefore I have decided to try to use Sea of Thieves method to accomplish this.

Even though I am relatively experienced in C++, doing this kind of hacky solution has me nervous. I want to make sure I’m not going to do this in a suboptimal way, so I’ll describe my plan here. My thought is to give each character an invisible character clone that navigates on the original static mesh, and that information is sent back to the “real” character. It seems like I am forced to use invisible characters if I want to use Detour Crowd Avoidance. Am I wrong about that? I’d love to hear feedback in case this leads to performance problems that I can’t easily solve.

Any advice is appreciated, thanks.

I got the Sea of Thieves method to work in the way I described, including with Detour Crowd Avoidance. I did it in c++. It didn’t take long to do but there were some tricky aspects. I recommend people go this route, it’s not that hard to do.

I haven’t done rotation yet, but I assume all that requires is applying some rotation math to the clicked point in addition to the regular XYZ translation. Am about to finish implementing jumping from NavLinkProxy with it.