Why Does My Union Keep Changing Size?

Hello fellow developers,
I am currently working on a train in Roblox and need to make the windows for the train. However, I keep running into this problem where when I use CSG on two parts that have been perfectly scaled, but the result is a union that has been slightly offsetted in position and size, which triggers my OCD. I have tried to check if the parts have been slightly offsetted, and this worked most of the time, but then on this particular union, it would not work.

As you can see, this is the negative part I will use to cut a hole in my window. (note the size and position) (it may be blurry, and s the position is 74, 5, 2 and the size is 1. 25, 2, 1)

Here is the frame which will be cut using the negative part. (also note the size and position) (Position: 74, 5, 2 and Size: 0.5, 2.5, 1.75)

But the resulting union has tiny offsets which is a problem for me with OCD. (Position: 73.996, 4.996, 2 and Size: 1.762, 2.509, 0.5)

Thank you for reading my post, and please give me solutions or suggestions when possible.

3 Likes

Yes. This triggers my OCD too. I have not found an answer to this problems though I do believe I have the reason why.

By negating the part, you are effectively getting rid of mass. Assuming that Roblox at least follows some laws of physics, if you change the mass you change the mass. In addition, with the negative part technically adding to the part as a NegativePart, it increases it and the value changes to become the outcome of the size of (Part+NegativePart)-NegatedArea.

Ok, let me try CSGing the parts while massless is on. Also, this problem doesn’t always occur, and most of the time it can be resolved.

Unfortunately, this did not work. (I was AFK for a bit)

This is because CSGv2 will shift some of your parts by barely significant increments to avoid the old “union unsolvable” issue. You could try disabling CSGv2 and trying this again, but don’t complain if it errors.

I’d also add that you can easily solve this by making the windows slightly larger, making them surround through the wall a bit.

1 Like

I just tested it and it seems that the problem has been resolved. I know have a union that is perfectly scaled, and I can continue building. Thank you for the solution.

2 Likes