How do I get the distance between two bounds? I recently made a post about how to fill some gaps and I got an idea that is based on getting the distance between the outer bounds of the position.
I need to get the distance between these bounds (including rotation)
Also I got something with a function but I still get my error that leaves some gaps but I’ll mark you as solution because it’s actually a solution for this thread.
You can just get the positions of the edges of the parts and then get the magnitude between them
Something like this:
local function getFarCornerPoint(segment)
return segment.Position + (segment.CFrame.LookVector * segment.Size.Z/2) + (segment.CFrame.RightVector * segment.Size.X/2)
end
local function getCloseCornerPoint(segment)
return segment.Position + (-segment.CFrame.LookVector * segment.Size.Z/2) + (segment.CFrame.RightVector * segment.Size.X/2)
end