Skip to content

Commit

Permalink
Merge pull request #100826 from Lielay9/csg-spin-360
Browse files Browse the repository at this point in the history
Fix gaps in CSGPolygon3D spin mode at 360 degrees
  • Loading branch information
Repiteo committed Dec 30, 2024
2 parents 1e63ed2 + d310d9f commit 77eb92f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/csg/csg_shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 77eb92f

Please sign in to comment.