How would you add ladders to navmesh based movement?

I would like to implement a simple ladder system for AI or indirectly controlled pawns (i.e. top down template), to connect otherwise inaccessible parts of the nav mesh (different floors), where the Pawn moves to the ladder, then using a climbing animation moves vertically to reach the other floor, where it resumes navigating on the NavMesh towards its destination.

What would be the best approach to do this (Preferably blueprint based)?

Is there already something available in the engine to achieve it or would I need to design an additional layer of pathfinding on top of the nav mesh system (i.e. if at ground level and destination is top level, find ladder actor that is connected to both, go to ladder, trigger scripted movement sequence, continue to original destination).

I looked into NavLinkProxy, comes close, but doesn’t seem to fit the bill. I’d need something similar but with the option to trigger a custom event on reaching the starting point of the proxy.

As it is a pretty common game element, I’m sure someone already figured it out.

This is an old question, but perhaps I can still shine some light on it for other people researching the topic.
This Reddit thread suggests using Nav Links, in combination with a “Smart Link” option and force-teleport/lerping position of the Pawn once it reaches for a ladder. Basically, you’re breaking up pathing into two distinct parts: the moment before it hits the ladder, and the moment it exits the ladder. The ladder itself is not part of the NavMesh interaction technically, because the Pawn is momentarily disconnected from AI pathfinding as it’s “climbing” the ladder. After it exits the ladder, NavMesh pathfinding is resumed (by plotting a new path, so yes, a slight extra path-finding overhead is introduced).

1 Like