A parser for navmesh version 16, which is currently used by CS:GO. This code is mainly targeted towards pathfinding.
Just copy the files into your project and you're ready to go!
std::error_code err { };
nav_mesh::nav_file map_nav( "path/to/map.nav", err );
//Alternatively, you can just call map_nav.load( "path/to/map.nav", err );
if(err.value() != 0) {
// @todo: handle errors accordingly
}
//Figure out from where to where you'd like to find a path
auto path = map_nav.find_path( start_point, end_point, err );
if(err.value() != 0) {
// @todo: handle errors accordingly
}
if ( !path.empty( ) ) {
// found a path, do cool stuff
}
- Parse Ladders properly
- Valve (Source Engine SDK 2013), code for parsing
- Lee Thomason (Micropather)
- Matthew Razza (gonav), unknown data at end of each Area