Level Editor/Workflows/Bots and navigation

Revision as of 03:46, 20 October 2026 by TeamSpecBot (talk | contribs) (Level Editor: bots and navigation workflow)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Bots find their way round a map with a navigation mesh: a map of the walkable ground, baked from your level. This page shows how to give a map one, and how bots then know what to do.

1. Cover the map with nav regions

  1. Functional > Nav Region and click on the floor.
  2. Resize its Extents so the box covers every floor, ramp and stair bots should use, with some height above the floors.
  3. Use several regions for a large or many-storeyed map. They can overlap and touch; the game joins them.

See Nav Region.

2. Bake

Select the regions and choose Functional > Bake Selected NavRegion (with none selected, every region is baked). The walkable area shows in the viewport. Look for:

  • gaps where bots should be able to walk: a step too high (over 0.457 m), a slope too steep, a doorway too low or too narrow for a player;
  • islands on top of crates or fences, which are harmless.

Each region has Bake On Export on by default, so the export always bakes again from the finished map. Terrain with Generate Navmesh on is baked at export too.

3. Doors and gates

You do not need to do anything special for doors and team gates: at export, each doorway's floor becomes a piece of navigation the game opens to the right bots while the door is open or the gate is theirs. Bake a nav region over every doorway as for any floor. If the export log says a door or a team's gates have no doorway polygons, there is no baked floor under them. See Door.

4. Tell the bots their jobs

With no orders a bot hunts whoever is nearest and wanders when there is nobody. That is right for a deathmatch. For any mode with an objective, the map's bot script (Map Config > Gamemode > Bot) gives each bot a job: defend this point, push the cart, collect that pickup, escort the carrier. See Bots.

5. Test

Start a playtest with bots and watch where they go. Bots that stand still or walk into a wall usually point at a gap in the navigation: bake again and check the area.

Tip: Stairs bake fine as long as each step is under 0.457 m. A collision-only ramp over detailed stairs makes walking smoother for players and bots alike.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Sandbox limits · Testing · King of the Hill · Team Deathmatch · API reference · What a script may use