Building Gadgets

Building Gadgets

110M Downloads

Even sizes are not supported by exchanging tool.

harikattar opened this issue ยท 3 comments

commented

Building Gadgets Version
1.3.9

Describe the bug
Only odd ranges are supported, even ranges round up to the next odd.

To Reproduce
Exchange surface with range set to 2, it makes a 3x3 square. 3 also makes a 3x3 square. Tried with building a surface and wall, they all appear to have the same issue. Row/column have the same behavior, they are 1, 3, 5 long and can't be 2, 4, 6.

Expected behavior
Able to make 2x2, 4x4, 6x6 etc surfaces.

Guessing it's something like calculating distance from the center in each direction and finding the blocks in that point. That will round up, since even sizes put you halfway into the next block. Instead, you want your points to be (range/2) left and ((range/2)+range) right. Same for up/down, etc.

commented

Yeah, this has never really been represented in the slider very well. We really should just ship even ranges to make it clear.

Essentially, the reason for this is: What's the center of a 2x2 area?

commented

The center of a 2x2 area is the pixel the four blocks all touch. Thinking about the center of whole-number sizes is wrong though, your math will always be dodgy. Find the voxel the player is looking at, then figure out what plane you're going to be on, then take your anchor as half the size up and to the left, and make a box of size down and to the right from there. for odd sizes that will work exactly the same way as it does now, for even sizes the box won't be centered exactly where you're looking but will operate in an understandable way.

commented

Yeah, for sure, I get this but when you're looking at a block, we take the block as the thing you're looking at, not your absolute vector of your looking direction.

The math we could do is possible but I worry this would hurt usability, not improve it. Looking at one size of a block vs the other one would likely just be confusing to users on why it's changed