Skip to content

Commit 5492f6b

Browse files
committed
Merge pull request godotengine#113923 from VewDev/master
Navigation: Improve error message for unreachable polygon case
2 parents fa9d162 + 2257594 commit 5492f6b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/navigation_2d/2d/nav_mesh_queries_2d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ void NavMeshQueries2D::_query_task_build_path_corridor(NavMeshPathQueryTask2D &p
402402
// unreachable.
403403
if (traversable_polys.is_empty()) {
404404
// Thus use the further reachable polygon
405-
ERR_BREAK_MSG(is_reachable == false, "It's not expect to not find the most reachable polygons");
405+
ERR_BREAK_MSG(is_reachable == false, "Invalid navigation index or connection pointers. Check preceding navmesh geometry or placement errors.");
406406
is_reachable = false;
407407
if (reachable_end == nullptr) {
408408
// The path is not found and there is not a way out.

modules/navigation_3d/3d/nav_mesh_queries_3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void NavMeshQueries3D::_query_task_build_path_corridor(NavMeshPathQueryTask3D &p
401401
// unreachable.
402402
if (traversable_polys.is_empty()) {
403403
// Thus use the further reachable polygon
404-
ERR_BREAK_MSG(is_reachable == false, "It's not expect to not find the most reachable polygons");
404+
ERR_BREAK_MSG(is_reachable == false, "Invalid navigation index or connection pointers. Check preceding navmesh geometry or placement errors.");
405405
is_reachable = false;
406406
if (reachable_end == nullptr) {
407407
// The path is not found and there is not a way out.

0 commit comments

Comments
 (0)