UDN
Search public documentation
NavigationMeshTechnicalGuide
Navigation Mesh Technical Guide
Document Summary: A quick guide to hooking up your AI to use a Navigation Mesh. For an introduction to the Navigation Mesh system in the Unreal Engine, see NavigationMeshReference. Document Changelog: Created by Matt Tonks.Overview
This is a quick and dirty guide to hooking up your AI to use a navigation mesh. For an introduction to the Navigation Mesh system in the Unreal Engine, see the navigation mesh reference. To make your AI pathfind it needs two things; A navigation handle, and it needs to implement the navigation handle interface.Navigation Handle
(NavigationHandle.uc)
The key distinction between the legacy style pathfinding functions in Unreal and the navigation mesh versions are that the mesh versions all live in the happy land of the Navigation Handle. A navigation handle is simply a component you can snap onto any Actor to give it path finding functionality. The handle keeps track of the current path, as well as talks to the low level data structures for the mesh.
Navigation handle functionality
Path constraint/goal evaluator functions similar to the default unreal versions. NOTE: You need to add at least one constraint and at least one goal evaluator for a path search to work. Otherwise it won't have any way of weighting your search. This will change soon to have a sane-default configuration (e.g. if you pass no constraints it will push a straight line distance constraint, and a AtGoal goal evaluator).-
FindPathis just like findpath in Pawn, except it will use the navigation mesh instead of the path node network. -
PointReachableis similar to pointreachable in Pawn, except it uses the obstacle mesh instead of a bunch of raycasts to determine reachability. This should be much faster than a normal pointreachable check.
Navigation Interface
(Interface_NavigationHandle.uc)
The Navigation Handle interface is what allows any actor to pathfind on the navigation mesh. During pathfinding certain basic attributes of the pathfinding entity are needed (width, supported edges, etc.) and this interface is what is queried by the path search functions in order to determine the pathfinding entity's capabilities.
Currently the interface looks like this:
virtual UBOOL AbleToSearch()=0;
virtual FVector GetSearchExtent()=0;
virtual FVector GetSearchStart()=0;
virtual UBOOL CanMantle() { return FALSE; }
virtual UBOOL CanCoverSlip() { return FALSE; }
