-
Notifications
You must be signed in to change notification settings - Fork 12
NAV mesh
In the upcoming update, zombies will use navigation mesh instead of nodegraph.
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
- Enable cheats with
sv_cheats 1
- Turn on nav editing with
nav_edit 1
- Aim towards ground where you'd expect a zombie to travel at and use the command
nav_mark_walkable
- Run command
nav_generate
- Wait for the game to finish generating the 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.
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)
TODO: Add video
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.
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.
Decrease nav_max_view_distance
(try 500)
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
Set zm_nav_computevisibility_threaded
to 0 and try again.