Nav Mesh: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(badly moved multipage)
(bms_bot use random navigation (it looks like that). bot_zombie can use it to spawn and walk.)
Line 5: Line 5:
#* {{css|4}}
#* {{css|4}}
#* {{csgo|4}}
#* {{csgo|4}}
#* {{bms|4}} (only {{ent|bot_zombie}})
# [[NextBot]] entities in:
# [[NextBot]] entities in:
#* {{l4d|4}}
#* {{l4d|4}}
Line 12: Line 13:
#* {{p3|4}}
#* {{p3|4}}
#* {{jb3|4}}
#* {{jb3|4}}
#* {{bms|4}}
…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.



Revision as of 02:38, 20 October 2024

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

A Navigation Mesh (NavMesh or nav mesh[Clarify]) is a data structure that stores data used for path finding, which is typically used by bots. In Source Source, 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 file format

Main article:  .nav

NAV files

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

Garry's Mod Garry's Mod

TheNavMesh 0 Garry's Mod uses the base navigation mesh (It doesn't use its own implementation unlike Valve games)
Counter-Strike: Source Counter-Strike: Source

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

CSNavMesh 1 * Appends approach area data to each area.
Team Fortress 2 Team Fortress 2 CTFNavMesh 2 Appends TF2-specific attribute flag to area data.
Left 4 Dead Left 4 Dead TerrorNavMesh 13
Left 4 Dead 2 Left 4 Dead 2 TerrorNavMesh 14

See also

External links