Godot Engine – Multi-platform 2D and 3D game engine
Navigation: Improve error message for unreachable polygon case
VewDev6127293907cd
diff --git a/modules/navigation_2d/2d/nav_mesh_queries_2d.cpp b/modules/navigation_2d/2d/nav_mesh_queries_2d.cppindex 70c715d1755..abfcfeaccdd 100644--- a/modules/navigation_2d/2d/nav_mesh_queries_2d.cpp+++ b/modules/navigation_2d/2d/nav_mesh_queries_2d.cpp@@ -402,7 +402,7 @@ void NavMeshQueries2D::_query_task_build_path_corridor(NavMeshPathQueryTask2D &p// unreachable.if (traversable_polys.is_empty()) {// Thus use the further reachable polygon- ERR_BREAK_MSG(is_reachable == false, "It's not expect to not find the most reachable polygons");+ ERR_BREAK_MSG(is_reachable == false, "Invalid navigation index or connection pointers. Check preceding navmesh geometry or placement errors.");is_reachable = false;if (reachable_end == nullptr) {// The path is not found and there is not a way out.diff --git a/modules/navigation_3d/3d/nav_mesh_queries_3d.cpp b/modules/navigation_3d/3d/nav_mesh_queries_3d.cppindex 4ce3df6872f..cbe33f40b67 100644--- a/modules/navigation_3d/3d/nav_mesh_queries_3d.cpp+++ b/modules/navigation_3d/3d/nav_mesh_queries_3d.cpp@@ -401,7 +401,7 @@ void NavMeshQueries3D::_query_task_build_path_corridor(NavMeshPathQueryTask3D &p// unreachable.if (traversable_polys.is_empty()) {// Thus use the further reachable polygon- ERR_BREAK_MSG(is_reachable == false, "It's not expect to not find the most reachable polygons");+ ERR_BREAK_MSG(is_reachable == false, "Invalid navigation index or connection pointers. Check preceding navmesh geometry or placement errors.");is_reachable = false;if (reachable_end == nullptr) {// The path is not found and there is not a way out.