Skip to content

Commit

Permalink
Add detail to NavigationPolygon outline error msg
Browse files Browse the repository at this point in the history
Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.
  • Loading branch information
smix8 committed Nov 10, 2022
1 parent 191c8ed commit f30ebac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scene/2d/navigation_region_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ void NavigationPolygon::make_polygons_from_outlines() {

TPPLPartition tpart;
if (tpart.ConvexPartition_HM(&in_poly, &out_poly) == 0) { //failed!
ERR_PRINT("NavigationPolygon: Convex partition failed!");
ERR_PRINT("NavigationPolygon: Convex partition failed! Failed to convert outlines to a valid NavigationMesh."
"\nNavigationPolygon outlines can not overlap vertices or edges inside same outline or with other outlines or have any intersections."
"\nAdd the outmost and largest outline first. To add holes inside this outline add the smaller outlines with opposite winding order.");
return;
}

Expand Down

0 comments on commit f30ebac

Please sign in to comment.