diff --git a/objects/Grid.cs b/objects/Grid.cs index 40e25a9..414b541 100644 --- a/objects/Grid.cs +++ b/objects/Grid.cs @@ -88,7 +88,7 @@ public partial class Grid : Area3D pos += halfSize[(int)axis] * normal; // Snap the position to the grid. - var halfOff = basis * halfSize.PosMod(1.0f); + var halfOff = (basis * halfSize + _halfGridActualSize).PosMod(1.0f); pos = halfOff + (pos - halfOff).Snapped(StepSize); return new(GlobalBasis * basis, GlobalTransform * pos);