1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Improve CSGPolygon3D documentation

- Describe why polygon triangulation usually fails in the error message.
This commit is contained in:
Hugo Locurcio
2022-01-21 19:57:52 +01:00
parent 40a348bce2
commit 1e1fb145b3
3 changed files with 5 additions and 4 deletions

View File

@@ -1757,7 +1757,7 @@ CSGBrush *CSGPolygon::_build_brush() {
}
int shape_sides = shape_polygon.size();
Vector<int> shape_faces = Geometry::triangulate_polygon(shape_polygon);
ERR_FAIL_COND_V_MSG(shape_faces.size() < 3, brush, "Failed to triangulate CSGPolygon");
ERR_FAIL_COND_V_MSG(shape_faces.size() < 3, brush, "Failed to triangulate CSGPolygon. Make sure the polygon doesn't have any intersecting edges.");
// Get polygon enclosing Rect2.
Rect2 shape_rect(shape_polygon[0], Vector2());