|
|
@ -88,7 +88,7 @@ public partial class Grid : Area3D |
|
|
|
pos += halfSize[(int)axis] * normal; |
|
|
|
pos += halfSize[(int)axis] * normal; |
|
|
|
|
|
|
|
|
|
|
|
// Snap the position to the grid. |
|
|
|
// 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); |
|
|
|
pos = halfOff + (pos - halfOff).Snapped(StepSize); |
|
|
|
|
|
|
|
|
|
|
|
return new(GlobalBasis * basis, GlobalTransform * pos); |
|
|
|
return new(GlobalBasis * basis, GlobalTransform * pos); |
|
|
|