Nav Mesh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Use {{game name}} in table, and reorganize table.)
(Link to Wikipedia article on navigation meshes.)
Line 1: Line 1:
{{lang|Nav Mesh}}
{{lang|Nav Mesh}}
A '''Navigation Mesh''' (or shorter: '''nav mesh''') represents the "walkable areas" of a map. This data is '''required''' by:
A [https://en.wikipedia.org/wiki/Navigation_mesh '''Navigation Mesh'''] (or shorter: '''nav mesh''') is a data structure that stores data used for path finding, which is typically used by bots. In {{game name|source|name=Source}}, navigation meshes are used by the following entities:
# [[Bot]]s and Hostages in:
# [[Bot]]s and Hostages in:
#* {{game name|css|name=Counter-Strike: Source}}
#* {{game name|css|name=Counter-Strike: Source}}
Line 9: Line 9:
#* {{game name|GMOD|name=Garry's Mod}}
#* {{game name|GMOD|name=Garry's Mod}}
#* {{game name|tf2|name=Team Fortress 2}}
#* {{game name|tf2|name=Team Fortress 2}}
These require the data to realize what's navigable in their environment, and path to their desired destination.
…to realize what's navigable in their environment, and path to their desired destination.


== NAV files ==
== NAV files ==

Revision as of 14:14, 17 November 2021

English (en)Deutsch (de)Esperanto (eo)Español (es)日本語 (ja)中文 (zh)Translate (Translate)

A Navigation Mesh (or shorter: nav mesh) is a data structure that stores data used for path finding, which is typically used by bots. In Template:Game name, navigation meshes are used by the following entities:

  1. Bots and Hostages in:
  2. NextBot entities in:

…to realize what's navigable in their environment, and path to their desired destination.

NAV files

Main article:  NAV

Navigation Mesh data is stored in a NAV file corresponding to the map file (.bsp) for which it is used. For example, the nav mesh for cstrike\maps\de_dust.bsp is stored in cstrike\maps\de_dust.nav.

Navigation Mesh Editing

Main article:  Nav Mesh Editing
Main article:  Nav Mesh Commands

The Navigation Mesh Editing is done in-game. A (new) .nav file can be generated with nav_generate (which requires sv_cheats 1 and nav_edit 1).

Game Specific SubVersions

Game Nav Mesh Class Subversion Notes
Template:Game name TheNavMesh 0 Garry's Mod is using the base navigation mesh(It doesn't use it's own implementation unlike Valve games)
Template:Game name

Counter-Strike: Global Offensive Counter-Strike: Global Offensive

CSNavMesh 1 * Appends approach area data to each area.
Template:Game name CTFNavMesh 2 Appends TF2-specific attribute flag to area data.
Template:Game name TerrorNavMesh 13
Template:Game name TerrorNavMesh 14

See also

External Links