pub fn regularize_nav_areas(
nav_areas: &FxHashMap<u32, NavArea>,
grid_granularity: usize,
walk_checker: &CollisionChecker,
) -> FxHashMap<u32, NavArea>
Expand description
Build a regularized navigation mesh with a fixed granularity from the original navigation areas.
First build a grid of cells and assign each cell to the closest original area. Also consider other original areas that intersect the cell. Then build connections between the new cells based on physical reachability in the game. Finally ensure that old connections are preserved.