bake_from_source_geometry_data_async creates no navmesh

Godot Version

4.4.1 Stable

Question

I have a project that uses the code from the 3D Navigation Mesh Chunks demo project and it produces the expected grid of navigation regions correctly. When I replace bake_from_source_geometry_data(...) with bake_from_source_geometry_data_async(...) no navigation meshes are created.

Am I missing some important detail when using the async version?

Demo project link: godot-demo-projects/3d/navigation_mesh_chunks at master · godotengine/godot-demo-projects · GitHub

When you switch the function to async you are baking on a thread which means the create_region_chunks() runs while your navmesh is still baking on the thread and empty.

So you would need to add a callback to wait for the bake to finish and only after that call the create_region_chunks().

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.