Cogito, ergo sum

UE3:NavigationHandle (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> NavigationHandle
Within class: 


Component that encapsulates navigation behavior. Attach this to your actor of choice to enable that actor to pathfind



Value: 768.f


Value: 8

this is a handy way of ensuring everyone is setting the necessary parameters.. this should always reflect the number of

parameters in the NavMeshPathParams struct, and then in SetupPathingParams a check will be inserted with the
number of params in existence at the time of writing the function, so if the number of params changes and the implementations
are not updated an assert will fire


Property group 'PathDebug'[edit]


Type: bool

when this bool is TRUE, statistics about which constraints are doing what will be printed following

path searches


Type: bool

when true TONS of information will be printed to the log, as well as a bunch of stuff drawn to the screen. debug lines will be drawn indicating the progress of the path traversal, and whenever a log message is printed related to an edge on the navmesh a number will be printed to the screen above it indexing into the log messages to tell you what that message is. RED lines indicate expansion was stopped at that step, other colors will change depending on the expansion generation (e.g. all edges traversed in the first step will be of the same color, second step a different color etc..

Internal variables[edit]


Type: pointer{FNavMeshPolyBase}

Modifiers: native


Type: Pylon

Current pylon AI is anchored to


Type: pointer{FNavMeshPolyBase}

Modifiers: transient, native

This points to the BestUnfinishedPathPoint. Which will usually be set by some EvaluateGoal or DetermineFinalGoal function/ In some cases it is not possible to get a full path, but having the best unfinished path is good enough (e.g. ai on top of a crevice, or on a navmesh island disconnected from everyone else)


Type: bool

AI should not update route cache - flag to prevent cache from being changed when pathing is used to evaluate squad location


Type: bool

when this is TRUE the goal evaluator chain will be treated as an OR chain instead of an AND chain


Type: NavMeshPathParams


Type: pointer{FNavMeshEdgeBase}

Modifiers: const, native

List of polys to move through


Type: Actor.BasedPosition

Final destination


Type: PathStore


Type: NavMeshPathConstraint

List of search constraints for pathing


Type: NavMeshPathGoalEvaluator


Type: pointer{FNavMeshPolyBase}

Modifiers: const, native

the poly we're currently trying to get inside



dummy struct used to match alignment in pathcache array

pointer{FNavMeshEdgeBase} Dummy 


Modifiers: native

pointer{IInterface_NavigationHandle} Interface 
the navhandle interface for the pathing entity
bool bCanMantle 
can this entity use mantle edges?
bool bNeedsMantleValidityTest 
do we need to perform extra checks when determining if an edge supports the entiy?
bool bAbleToSearch 
is this entity valid to pathfind (does it have a pawn, etc..)
Object.Vector SearchExtent 
the size of the entity looking for a path
Object.Vector SearchStart 
the starting location for the path search
float MaxDropHeight 
the maximum valid height for this entity to 'drop down' (e.g. max height to use on dropdown edges)
float MinWalkableZ 
the minimum value for the Z component of walkable surfaces
float MaxHoverDistance 
max hover distance -- the maximum distance this entity can hover above the surface of a polygon. (-1 means arbitrarily high)


Modifiers: native

array<EdgePointer> EdgeList 


Modifiers: native

pointer{FNavMeshPolyBase} Poly 
Object.Vector P1 
Object.Vector P2 


Static native functions[edit]


native static function Pylon GetPylonFromPos (Object.Vector Position)


static native final function bool ObstacleLineCheck (Object.Vector Start, Object.Vector End, Object.Vector Extent, optional out Object.Vector out_HitLoc, optional out Object.Vector out_HitNorm)

does a line check against the obstacle mesh


  • Start - start of the line segment to check
  • End - end position of the line segment to check
  • Extent - extent of box to be swept along line segment
  • out_HitLoc - hit location of obstacle line check (if any)
  • out_hitNorm - hit normal of surface we hit during obstacle line check (if any)


TRUE if nothing was hit (note: only collides against the obstacle mesh, not the normal mesh)


static native final function bool ObstaclePointCheck (Object.Vector Pt, Object.Vector Extent)

Does a point check against the obstacle mesh


  • Pt - centroid of box to check aginast obstacle mesh
  • Extent - Extent of box to check against obstacl mesh


TRUE if didn't hit anything

Native functions[edit]


native function bool ActorReachable (Actor A)


native function AddGoalEvaluator (NavMeshPathGoalEvaluator Evaluator)


native function AddPathConstraint (NavMeshPathConstraint Constraint)


native function ClearConstraints ()

Path constraint operations Allows the user to push a list of constraints which affect pathing heuristics, as well as determine when the path traversal is finished


native function bool ComputeValidFinalDestination (out Object.Vector out_ComputedPosition)


will find a valid, pathable point near the passed desired destination


native function DrawPathCache (optional Object.Vector DrawOffset, optional bool bPersistent, optional Object.Color DrawColor)


native function bool FindPath (optional out Actor out_DestActor, optional out int out_DestItem)

this will set up a path search, and ultimately call GeneratePath to do the A* path search Note: it's up to your constraints to determine what it is you're doing.. if you're trying to

     path to a particular point you probably want to add a NavmeshGoal_At goal evaluator
     and supply it with the position you're pathing toward so the goal evaluator can stop the path search
     once the destination is found.  You also need a path constraint to provide a heuristic for the search,
     which typically is going to consist of at least a NavMeshPath_Toward which will weight based on
     euclidian distance to the goal.


  • out_DestActor - output variable which goal evaluators can use to supply the 'found' actor at path finish
  • out_DestItem - output variable which goal evaluators can use to supply extra data to path search clients


whether the path search was successful or not


native function bool FindPylon ()


native function GetAllPolyCentersWithinBounds (Object.Vector Pos, Object.Vector Extent, out array<Object.Vectorout_PolyCtrs)

returns the center points of all polys within the specefied area


  • Pos - Center of bounds to check for polys
  • Extent - Extent of area to return
  • out_PolyCtrs - out var of poly centers within the specefied area


native function Object.Vector GetBestUnfinishedPathPoint () const

This will return the best "unfinished path". We need this for things where we are using the navmesh to find locations which are not connected (pathable) to the originating NavHandle but are still valid world positions.


native function Object.Vector GetFirstMoveLocation ()

this will a good point on the first edge in the pathcache (or the finaldest if there is no pathcache)


native function bool GetNextMoveLocation (out Object.Vector out_MoveDest, float ArrivalDistance)

will return the actual point that we should move to right now to walk along our path this will usually be a point along our current edge, but sometimes will be something else in special situations (e.g. right on top of the edge)


  • out_MoveDest - output movement destination we have determined
  • ArrivalDistance - this tells getnextmovelocation how close to a point we have to be before MoveTo() returns necessary so we can compesnate for early arrivals in some situations


native function GetValidPositionsForBox (Object.Vector Pos, float Radius, Object.Vector Extent, bool bMustBeReachableFromStartPos, out array<Object.Vectorout_ValidPositions, optional int MaxPositions, optional float MinRadius, optional Object.Vector ValidBoxAroundStartPos)

will return a list of valid spots on the mesh which fit the passed extent and are within radius to Pos


  • Pos - Center of bounds to check for polys
  • Radius - radius from Pos to find valid positions within
  • Extent - Extent of entity we're finding a spot for
  • bMustBeReachableFromStartPos - if TRUE, only positions which are directly reachable from the starting position will be returned
  • ValidPositions - out var of valid positions for the passed entity size
  • MaxPositions - the maximum positions needed (e.g. the search for valid positions will stop after this many have been found)
  • MinRadius - minimum distance from center position to potential spots (default 0)
  • ValidBoxAroundStartPos - when bMustBeReachableFromStartPos is TRUE, all hits that are within this AABB of the start pos will be considered valid


native function bool IsAnchorInescapable ()

this function will determine if the poly this entity is currently in is inescapable by that entity


TRUE If the poly this handle is in isn't escapable


native function LimitPathCacheDistance (float MaxDist)

will clip off edges from the pathcache which are greater than the specified distance from the start of the path


  • MaxDist - the maximum distance for the path


native function bool LineCheck (Object.Vector Start, Object.Vector End, Object.Vector Extent, optional out Object.Vector out_HitLocation, optional out Object.Vector out_HitNormal)

does a line check against the Walkable mesh


  • Start - start of the line segment to check
  • End - end position of the line segment to check
  • Extent - extent of box to be swept along line segment


TRUE if nothing was hit


native function PathCache_Empty ()

Path Cache Operations Allows operations on nodes in the route while modifying route (ie before emptying the cache) Should override in subclasses as needed


native function Object.Vector PathCache_GetGoalPoint ()

After FindPath has been called this will return the location in the world that the pathfind found based on the NavMeshGoals

the FindPath used.


native function PathCache_RemoveIndex (int InIdx, int Count)


native function bool PointCheck (Object.Vector Pt, Object.Vector Extent)

Does a point check against the Walkable mesh


  • Pt - centroid of box to check against obstacle mesh
  • Extent - Extent of box to check against obstacle mesh


TRUE if didn't hit anything


native function bool PointReachable (Object.Vector Point)


native function bool SetFinalDestination (Object.Vector FinalDest)

lets the navigation handle know what the ultimate goal of the current move is


  • FinalDest - the destination desired


whether or not the final destination is reachable


native function bool SuggestMovePreparation (Object.Vector MovePt, Controller C)

this will notify our curretn edge we're about to traverse it, and allow that edge to perform custom actions for traversal


  • MovePt - the point we're about to move to
  • C - controller we're suggesting move prep for


TRUE if the edge is handling getting the bot to the proper position for the move, FALSE if calling code is responsible for getting th bot to movept

Other instance functions[edit]


function NavMeshPathConstraint CreatePathConstraint (class<NavMeshPathConstraintConstraintClass)

Path shaping creation functions... these functions by default will just new the class, but this offers a handy interface to override for to do things like pool the constraints


function NavMeshPathGoalEvaluator CreatePathGoalEvaluator (class<NavMeshPathGoalEvaluatorGoalEvalClass)


function int GetPathCacheLength ()