Unreal Developer Network Content Creation
Welcome to the Unreal Developer Network The Engine Unreal Powered Content Creation Technical Playstation2 Xbox Gamecube Licensee Log In

Content Creation

Content Creation home

Documents listed below, but not hyperlinked, are restricted to engine licensees only.

As certain texts become relevant, due to released games using that technology, new documents will be made available. Check back often!
 
Getting Started
   - WhatToReadFirst
   Support
   - UnEdit (mailing list)
   - UnEditTraffic (summaries)
   - UnDevIRC (chat)
   - UnDevIRCTraffic (summaries)
   - UnrealEdSux0rs (bug list)
   Engine Prerequisites
   - TextureSpecifications
   - TextureComparison
   - Etc.

General Editor
   Basics
   - IntroToUnrealEd
   - UnrealEdInterface
   - RotationGizmo
   - UnrealEdKeys
   - BrushClipping
   - VertexEditing
   - BoxSelection
   - ShapeEditor
   - ExampleMaps
   - TriggersTutorial
   - Workflowandmodularity
   Primitives
   - BspBrush
   - MirrorsAndWarpZones
   - HardwareBrush
   - MoversTutorial
   - UKXPackagesTutorial
   - TerrainTutorial
   - VolumesTutorial
   - LightingTutorial
   - ProjectiveTutorial
   - MaterialTutorial
   - CollisionTutorial
   - FluidSurfaceTutorial
   Animation
   - Animnotifies
   - Animbrowsertutorial
   - Animbrowserreference
   Particles
   - Emitterstutorial
   - EmittersExamples
   New Particle Editor
   - ParticleSystems
   - ExampleParticleSystems
   Matinee
   - MatineeTutorial
   - MatineeExample
   - MatineeDemoOpening
   - MatineeDemoDropship
   - SampleMatineeTips
   Scripted Sequences
   - ScriptedSequenceTutorial
   - ScriptedSequenceActions
   - AIControllers
   Techniques
   - LevelTransitions
   - LevelOptimization
   - GroupsBrowser
   - NavigationAI
   - VertexBlendingTutorial
   - ConvertingContent739To829

Tools
   - ActorX
   - ActorXMaxTutorial
   - ActorXMayaTutorial
   - StaticMeshesFromMaya
   - UmodWizard
   - ModelingTableOfContents
   - CADtoUnreal

mathengine.gif
Karma Physics
   - IntroToKarma
   - KarmaReference
   - ImportingKarmaActors
   - UsingKarmaActors
   - KarmaAuthoringTool
   - RagdollsInUT2003
   - KarmaExampleUT2003
   - ExampleMapsKarmaColosseum

secretlevel.gif
PlayStation2 and GameCube
   - ConsoleDevelopment

Contribute!
You can create a new page, and then you can edit this list to add it to the categories, as well as edit the Content Creation homepage to tell everyone about it!

Make Requests!
You can also stop by the UdnStaff page to see what we're working on, and edit it to add your own document requests.


Please take note! For mod developers working with Unreal Tournament 2003, this documentation is meant to be a starting point for your own explorations into UT2003, not a definitive guide. There will be differences between the documentation here and the product in your hands, and you may have to figure out quite a bit for yourself. Check out the Unreal Tournament 2003 page in the Unreal Powered area for links to community sites if you're having problems. UDN is a licensee support site, and cannot provide technical support or game-specific assistance to end users.

NavigationAI

Licensees can log in.

Interested in the Unreal engine? Check out the licensing page.

Questions about UDN itself? Contact the UDN Staff.

Navigation AI for Level Designers

Document Summary: A guide and reference for setting up Pathnodes and using AI Paths.

Document Changelog: Last updated by Vito Miliano (UdnStaff), for latest updates. Original author was Steve Polge (EpicGames).

Overview

This document describes how to set up navigation networks in a level so that NPCs can efficiently navigate to any point in the level. The intended audience is level designers.

Basic Pathing

Level designers place PathNodes (a subclass of NavigationPoint) in their levels on surfaces which NPCs can walk on, or in volumes which NPCs can swim in. For PathNodes to connect, they should be less than 1200 Unreal units apart (programmers can modify MAXPATHDIST in UnPath.h to change this value). 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). Having two NavigationPoints too close together (overlapping) can cause AI 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).

small-naviga1.gif (larger version)

After placing 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. Paths will be displayed in various colors, indicating important information about the path:

  • 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 NavigationPoints can be forced, if no connection is automatically made, by putting the name of the destination NavigationPoint in the ForcedPaths[] array of the source NavigationPoint (in the NavigationPoint properties sheet).
  • Red - proscribed path. A path between two NavigationPoints can be proscribed by putting the name of the destination NavigationPoint in the ProscribedPaths[] array of the source NavigationPoint (in the NavigationPoint properties sheet).

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.

Debugging Paths

After building paths, a window may pop up in the editor with a list of pathing errors. Click on an error to take you to the offending NavigationPoint.

After the level is completely pathed and paths have been defined, use the 'Review Paths' option in the Tools menu. The following items are checked:

  • All NavigationPoints with bMustBeReachable true can be reached from any path in the level.

  • All movers have an appropriate NavigationPoint associated with them (unless the mover's editable bNoAIRelevance property is true).

  • Checks if PathNodes should be converted to JumpDests.

In a future version, 'Review Paths' will also use random walks to verify that the level is completely pathed, and check for redundant PathNodes.

If an AI NPC seems confused or is doing something funky, view it by using the 'Viewclass pawn' console command, use the 'ShowDebug' console command to see what it's thinking and the path it is following. To check navigation paths while in the level, use 'RememberSpot' to mark a location. Then, using 'ShowDebug' while (without viewing something else) will show you a continually updated path to the marked location.

Doors

Door 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 Door NavigationPoint that should be updated as needed:

  • DoorTag - the tag of the mover with which this Door is associated.
  • DoorTrigger - if the door is triggered, this is the tag of the trigger actor which will open the door.
  • bInitiallyClosed - whether the default state of the mover allows movement (if false), or prevents it (if true, the default value).
  • bBlockedWhenClosed - if the mover is closed, there is no way for the NPC to open it. (false by default)

Movers now have a bAutoDoor property. If set to true, a Door pathnode is automatically generated for that mover. This should work for most doors.

JumpPads

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 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

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 entries.

Lifts

A 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 LiftCenter and 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 LiftCenter. 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.

Ladders

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 to false. The Ladder centers must be within the LadderVolume. 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.


NavigationAI - r1.12 - 08 Jul 2003 - 22:13 GMT - Copyright © 2001-2003 Epic Games
Unreal Developer Network Content by those crazy Perilith guysSite design and art by 2 design