A way to tell if two Region3s are intersecting?

I’m wondering if there’s a method I can use to tell if two Region3s are intersecting.

I’m thinking sort of like :FindPartsinRegion3() or :GetTouchingParts() except it detects another Region3 instead of a part.

Maybe this works.

local function areR3sIntersecting(a, b)
    local posDiff = a.CFrame.Position-p.CFrame.Position
    posDiff = Vector3.new(math.abs(posDiff.X), math.abs(posDiff.Y), math.abs(posDiff.Z))
    local maxDiff = (a.Size+b.Size)*.5
    return posDiff.X < maxDiff.X and posDiff.Y < maxDiff.Y and posDiff.Z < maxDiff.Z
1 Like

This makes sense

But I’m moreso looking to detect the two Region3s intersecting dynamically
Like without already being able to reference the second Region3 in the code

Like how with a part you can use .Touched to tell when a new part, previously unknown to the script, makes contact with it.
I want to setup a Region3, and be able to detect when a new and unknown Region3 intersects with it in live gameplay.

My bad for explaining poorly

I’m not sure Region3s are what I want to be using to achieve this, but I don’t really know.

Unfortunately there’s no way to do that (from my knowledge). Your only option would be to store all the Region3s you want to compare to the one you’re making, and you can include properties for each one such as their corner coordinates, size, etc.