Cogito, ergo sum
UE3:NavigationHandle (UDK)
Object >> NavigationHandle |
Contents
- 1 Constants
- 2 Properties
- 3 Structs
- 4 Functions
- 4.1 Static native functions
- 4.2 Native functions
- 4.2.1 ActorReachable
- 4.2.2 AddGoalEvaluator
- 4.2.3 AddPathConstraint
- 4.2.4 ClearConstraints
- 4.2.5 ComputeValidFinalDestination
- 4.2.6 DrawPathCache
- 4.2.7 FindPath
- 4.2.8 FindPylon
- 4.2.9 GetAllPolyCentersWithinBounds
- 4.2.10 GetBestUnfinishedPathPoint
- 4.2.11 GetFirstMoveLocation
- 4.2.12 GetNextMoveLocation
- 4.2.13 GetValidPositionsForBox
- 4.2.14 IsAnchorInescapable
- 4.2.15 LimitPathCacheDistance
- 4.2.16 LineCheck
- 4.2.17 PathCache_Empty
- 4.2.18 PathCache_GetGoalPoint
- 4.2.19 PathCache_RemoveIndex
- 4.2.20 PointCheck
- 4.2.21 PointReachable
- 4.2.22 SetFinalDestination
- 4.2.23 SuggestMovePreparation
- 4.3 Other instance functions
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
NavigationHandle
Component that encapsulates navigation behavior. Attach this to your actor of choice to enable that actor to pathfind
Constants[edit]
LINECHECK_GRANULARITY[edit]
Value: 768.f
NUM_PATHFINDING_PARAMS[edit]
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
Properties[edit]
Property group 'PathDebug'[edit]
bDebugConstraintsAndGoalEvals[edit]
Type: bool
when this bool is TRUE, statistics about which constraints are doing what will be printed following
path searches
bUltraVerbosePathDebugging[edit]
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]
AnchorPoly[edit]
Type: pointer{FNavMeshPolyBase}
Modifiers: native
AnchorPylon[edit]
Type: Pylon
Current pylon AI is anchored to
BestUnfinishedPathPoint[edit]
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)
bSkipRouteCacheUpdates[edit]
Type: bool
AI should not update route cache - flag to prevent cache from being changed when pathing is used to evaluate squad location
bUseORforEvaluateGoal[edit]
Type: bool
when this is TRUE the goal evaluator chain will be treated as an OR chain instead of an AND chain
CachedPathParams[edit]
Type: NavMeshPathParams
CurrentEdge[edit]
Type: pointer{FNavMeshEdgeBase}
Modifiers: const, native
List of polys to move through
FinalDestination[edit]
Type: Actor.BasedPosition
Final destination
PathCache[edit]
Type: PathStore
PathConstraintList[edit]
Type: NavMeshPathConstraint
List of search constraints for pathing
PathGoalList[edit]
Type: NavMeshPathGoalEvaluator
SubGoal_DestPoly[edit]
Type: pointer{FNavMeshPolyBase}
Modifiers: const, native
the poly we're currently trying to get inside
Structs[edit]
EdgePointer[edit]
dummy struct used to match alignment in pathcache array
- pointer{FNavMeshEdgeBase} Dummy
[edit]
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)
PathStore[edit]
Modifiers: native
- array<EdgePointer> EdgeList
PolySegmentSpan[edit]
Modifiers: native
- pointer{FNavMeshPolyBase} Poly
- Object.Vector P1
- Object.Vector P2
Functions[edit]
Static native functions[edit]
GetPylonFromPos[edit]
ObstacleLineCheck[edit]
does a line check against the obstacle mesh
Parameters:
- 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)
Returns:
- TRUE if nothing was hit (note: only collides against the obstacle mesh, not the normal mesh)
ObstaclePointCheck[edit]
Does a point check against the obstacle mesh
Parameters:
- Pt - centroid of box to check aginast obstacle mesh
- Extent - Extent of box to check against obstacl mesh
Returns:
- TRUE if didn't hit anything
Native functions[edit]
ActorReachable[edit]
AddGoalEvaluator[edit]
AddPathConstraint[edit]
ClearConstraints[edit]
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
ComputeValidFinalDestination[edit]
ComputeValidFinalDestination
will find a valid, pathable point near the passed desired destination
DrawPathCache[edit]
FindPath[edit]
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.
Parameters:
- 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
Returns:
- whether the path search was successful or not
FindPylon[edit]
GetAllPolyCentersWithinBounds[edit]
returns the center points of all polys within the specefied area
Parameters:
- 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
GetBestUnfinishedPathPoint[edit]
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.
GetFirstMoveLocation[edit]
this will a good point on the first edge in the pathcache (or the finaldest if there is no pathcache)
GetNextMoveLocation[edit]
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)
Parameters:
- 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
GetValidPositionsForBox[edit]
will return a list of valid spots on the mesh which fit the passed extent and are within radius to Pos
Parameters:
- 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
IsAnchorInescapable[edit]
this function will determine if the poly this entity is currently in is inescapable by that entity
Returns:
- TRUE If the poly this handle is in isn't escapable
LimitPathCacheDistance[edit]
will clip off edges from the pathcache which are greater than the specified distance from the start of the path
Parameters:
- MaxDist - the maximum distance for the path
LineCheck[edit]
does a line check against the Walkable mesh
Parameters:
- 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
Returns:
- TRUE if nothing was hit
PathCache_Empty[edit]
Path Cache Operations Allows operations on nodes in the route while modifying route (ie before emptying the cache) Should override in subclasses as needed
PathCache_GetGoalPoint[edit]
After FindPath has been called this will return the location in the world that the pathfind found based on the NavMeshGoals
the FindPath used.
PathCache_RemoveIndex[edit]
PointCheck[edit]
Does a point check against the Walkable mesh
Parameters:
- Pt - centroid of box to check against obstacle mesh
- Extent - Extent of box to check against obstacle mesh
Returns:
- TRUE if didn't hit anything
PointReachable[edit]
SetFinalDestination[edit]
lets the navigation handle know what the ultimate goal of the current move is
Parameters:
- FinalDest - the destination desired
Returns:
- whether or not the final destination is reachable
SuggestMovePreparation[edit]
this will notify our curretn edge we're about to traverse it, and allow that edge to perform custom actions for traversal
Parameters:
- MovePt - the point we're about to move to
- C - controller we're suggesting move prep for
Returns:
- 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]
CreatePathConstraint[edit]
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