Make NavMesh aware of teleporters

I’m working on adding teleporters to my game right now and am having trouble getting the AI to actually use them. I first tried using a NavLinkProxy but those only work between adjacent tiles on the nav mesh while my teleporters might span all the way across the map. I found something saying I can just change my tile size but we also allow the nav mesh to change dynamically at runtime so that’s too slow to be viable.

Is it possible to make a custom NavLink or something that just has the nav mesh send actors to one point and I handle getting them to the other point?

The way I’d handle that is by adding a high-level navigation graph that would know about teleporters, and use UE4 AI metapaths. It’s something we’re using both in Paragon and Fortnite, so most of the kinks have been ironed out. You ‘just’ have to build the graph :wink:

Come to think of that I could generalize the graph we have in Paragon and move it to AIModule or something like AINavPlugin. Don’t hold your breath, though, it can take some time with current workload :wink:

Cheers,

–mieszko

That’s the FMetaNavMeshPath struct, right? Is there any documentation for that anywhere or should I just poke through the code until I figure out what’s going on?

@MieszkoZ I’m also wondering if I could use the meta paths for something I’m working on, any chance of a very basic pointer in how they can be used? Does this require implementing a custom ANavigationData class?