From d310d9f975a3968a26d33036cdb09a7d5b2ec79d Mon Sep 17 00:00:00 2001 From: Hei <40064911+Lielay9@users.noreply.github.com> Date: Thu, 26 Dec 2024 13:59:24 +0200 Subject: [PATCH] Fix gaps in CSGPolygon3D spin mode at 360 degrees --- modules/csg/csg_shape.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index a908b1441251..b8035772994d 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -2255,7 +2255,11 @@ CSGBrush *CSGPolygon3D::_build_brush() { current_xform.translate_local(Vector3(0, 0, -depth)); } break; case MODE_SPIN: { - current_xform.rotate(Vector3(0, 1, 0), spin_step); + if (end_count == 0 && x0 == extrusions - 1) { + current_xform = base_xform; + } else { + current_xform.rotate(Vector3(0, 1, 0), spin_step); + } } break; case MODE_PATH: { double previous_offset = x0 * extrusion_step;