Search public documentation:
PathNodes (a subclass of
NavigationPoint) in their levels on surfaces which NPCs can walk on, or in volumes which NPCs can swim in.
PlayerStarts are also
NavigationPoints, and they perform the same navigation function. In addition,
InventorySpots are automatically placed at the location of every pickup in the level when building paths (they are invisible, but you will be able to see path connections to them).
PathNodes to connect, they should be less than 1200 Unreal units apart (programmers can modify MAXPATHDIST in
UnPath.h to change this value). Having two
NavigationPoints too close together (overlapping) can cause AI navigation problems and should be avoided. When placing
PathNodes, the goal is to make sure that every area of the level is covered by a
PathNode or some other
NavigationPoint. An area is covered if an NPC could walk to some
PathNode less than 1200 units away completely unobstructed (i.e. without having to step around anything).
PathNodes, the level designer can build the connections between
NavigationPoints by using the Build AI Paths option in the Build menu (or by doing a full rebuild). Once paths have been built, they can be seen in the various level view windows by using the Show Paths option under the View menu.
Paths will be displayed as lines from one
NavigationPoint to another. If NPCs can traverse the path in either direction, there will be two lines, with an arrowhead pointing in each direction. Otherwise, the line will show with an arrowhead in which direction the path can be traversed.
Even if the NPCs using the paths are small, it is always better to tweak the
PathNode positions to make the connecting paths as wide as possible. NPCs will smoothly round corners, or strafe back and forth within a path, so larger paths will result in more natural looking movement.
Once a level has a large number of paths, it can take a while to rebuild all the paths. To tweak path placement, use the Build Changed Paths button in the Build Options menu. This will only rebuild paths between
NavigationPoints which have been added, removed, or moved. Before saving and playing the level, however, a full path rebuild is required.
- White - very wide path, which large NPCs can use (large is defined by MAXCOMMONRADIUS in
UnPath.h, with a default value of 120).
- Green - wide path, which moderately large NPCs can use (defined by COMMONRADIUS, with a default value of 72).
- Blue - narrow path, useable by smaller NPCs.
- Purple - path using a Lift or Teleporter.
- Light Purple - path using a Ladder.
- Yellow - forced path. A path between two
NavigationPointscan be forced, if no connection is automatically made, by putting the name of the destination
NavigationPointin the ForcedPaths array property of the source
- Red - proscribed path. A path between two
NavigationPointscan be proscribed by putting the name of the destination
NavigationPointin the ProscribedPaths array property of the source
NavigationPointswith bMustBeReachable set to true can be reached from any path in the level.
- All Movers have an appropriate
NavigationPointassociated with them (unless the
Mover'seditable bNoAIRelevance property is true).
- Whether or not
PathNodesshould be converted to
If an AI NPC seems confused or is doing something funky, the following console commands are available:
Viewclass Pawn- to view the AI NPC in question.
ShowDebug- to see what the AI NPC is thinking and the path it is following.
RememberSpot- to mark a location when check navigation paths while in the level. Then, using
ShowDebug(without viewing something else) will show you a continually updated path to the marked location.
NavigationPoints should be placed in conjunction with any
Mover that acts as a door (based on its position, it allows or blocks movement between two areas). The
Door should be placed in the center of the affected area (typically, in the middle of the actual static mesh used for the door - but low enough to touch the ground). There are also several important properties of a
NavigationPoint that should be updated as needed:
- DoorTag - the tag of the
Moverwith which this
- DoorTrigger - if the
Dooris triggered, this is the tag of the trigger actor which will open the
- bInitiallyClosed - whether the default state of the
Moverallows movement (if false), or prevents it (if true, the default value).
- bBlockedWhenClosed - if the
Moveris closed, there is no way for the NPC to open it (false by default).
Movers now have the bAutoDoor property. If set to true, a
PathNode is automatically generated for that
Mover. This should work for most
JumpPads will throw any
Pawn touching them in a specified direction.
JumpPads are set up by specifying a destination
PathNode in the first entry of the ForcedPaths array property of the
JumpPad. The appropriate jump velocity is automatically calculated when paths are rebuilt. The JumpModifier vector property of the
JumpPad can be set if for any reason the automatically generated velocity is problematic.
JumpDests should be used instead of
PathNodes at any spot that is too high to jump up to, but is linked to paths below it.
JumpSpots will be used by NPCs in low gravity, or if they have some kind of jump boost. The path from which the bot should jump to the
JumpSpot should have the
JumpSpot in one of its ForcedPath array property entries.
Mover used as a lift should never use the BumpOpenTimed state (use StandOpenTimed instead).
Movers used as
Lifts have two types of
NavigationPoints associated with them. A
LiftCenter should be placed on the lift at its center. A
LiftExit should be placed at each exit from the
Lift (but far enough away so that an NPC standing there will not interfere with the
Lift). Both the
LiftExits have a LiftTag property which must be set to the tag of the
Mover. In addition, if the lift is triggered, put the tag of the triggering actor in the LiftTrigger property of the
LiftExits also have an optional property, SuggestedKeyFrame, which can be set to the keyframe number of the mover when the
LiftExit can be used. This may improve navigation by NPCs in some situations.
LadderVolumes must be oriented to face the wall being climbed (by adjusting their WallDir property, which is displayed as a directional arrow when the
LadderVolume is selected). In most cases, level designers can allow Ladder
NavigationPoints to be automatically added when paths are built, at the top and bottom of the
LadderVolume. However, if there are any problems with the automatically placed Ladders, level designers can manually place the Ladders after setting the
LadderVolume bAutoPath property to false. The Ladder centers must be within the
LadderVolume should touch the floor at its bottom, and poke over the edge at the top by at least the height of the largest NPC using the Ladder.
Keypoint Reference for a list of different Keypoint types and their uses.