Skip to content
Miikka Ylätalo edited this page Apr 24, 2018 · 1 revision

In the upcoming update, zombies will use navigation mesh instead of nodegraph.

Creating a NAV mesh

NOTE: This tutorial assumes you already know how to use the game console.

Creating a basic NAV mesh is simple. It is recommended to use a special config designed for nav editing. Use it with: exec nav_edit

  1. Enable cheats with sv_cheats 1
  2. Turn on nav editing with nav_edit 1
  3. Aim towards ground where you'd expect a zombie to travel at and use the command nav_mark_walkable
  4. Run command nav_generate
  5. Wait for the game to finish generating the mesh.

Fixing up generated mesh

You've now created the base mesh. The job isn't done yet. The generated mesh may fail in some places.

Make sure you have nav_edit 1 enabled.

Delicate areas to check:

It is important that you go through parts of the map that are susceptible to inaccurate generation, such as:

  • Doorways
  • Stairs
  • Breakable walls (zombie closets)
  • Bridges
  • Places where the generator may not reach (roofs, parts of the map that are completely separate)

What to look out for:

TODO: Add video

Missing areas

By hovering your cursor over the world, you can see nearby areas. If nothing is displayed, this means there are no nav areas there.

NPCs will refuse to move without areas and areas that have no connection.

Areas that are not connect

You can tell if an area is connected to another by their connection line color.

  • Cyan = Connected both ways (can travel both ways)
  • Dark Blue = Only traversable from the highlighted area

NPCs will refuse to move across areas if they are not connected.

Problems

Huge open map - computing visibility takes forever! (zm_basin_b3)

Decrease nav_max_view_distance (try 500)

Huge map - Ton of useless nav areas (zm_gasdump, zm_basin_b3)

You have two options:

  • Block off these areas with NPC clip.
  • Remove the areas manually. You can do this relatively fast with commands:
    • nav_drag_selection_volume_zmin_offset 1000
    • nav_drag_selection_volume_zmax_offset 1000
    • nav_begin_drag_selecting
    • nav_end_drag_selecting
    • nav_delete

Generating nav mesh crashes my game! (zm_desert_skystation)

Set zm_nav_computevisibility_threaded to 0 and try again.