소스 검색

Add detail to NavigationPolygon outline error msg

Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.

(cherry picked from commit f30ebacbe851bd207e1c55e82d04caf150a59690)
smix8 2 년 전
부모
커밋
2ead966f87
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      scene/2d/navigation_polygon.cpp

+ 3 - 1
scene/2d/navigation_polygon.cpp

@@ -295,7 +295,9 @@ void NavigationPolygon::make_polygons_from_outlines() {
 
 	TriangulatorPartition 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;
 	}