Generating the navigation mesh