From 4a9c859c6d283fbb635b01807629d03eacff217b Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Thu, 10 Nov 2022 20:47:35 +0100 Subject: [PATCH] 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) --- scene/2d/navigation_polygon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index b2f14bcde..1d37074ae 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -296,7 +296,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; }