How would I check if one part is completely engulfed in another?

How would I check if one part doesn’t have any part of it reaching out of another part?

You can use Region3

How would I use a region3 to find that it’s completely inside another part?

Oh wait I was thinking of something else, I did not read that right. Lemme think :)!

Nono, you have it right I believe. You need to check the parts inside of the Region3 that is in the exact same position and size of the part that you are focusing on. This will return a table with all the parts inside the region, but this will include the part you started with.

ok but how do I check if its 100% in the region?

or does checking with region3 only give back parts that are 100% in the region

Using the Region3 method will return any part that intersects with the region in any form. This may be a very annoying process, but my only thought is to make regions around the main region and check if the part overlaps into those, meaning it is not 100% in.

alright thank you for the answer

1 Like

I was thinking comparing cframes since cframes contain position and orientation. If they both equal then they are 100% in each other. This hould be less annoying

but like what if they’re not and it’s just a small part

Then compare the size as well with the cframe no?

Just quickly checking – why do you want to do this? There might be a better way.

Yeah region3 might do a lot of lag when loops over loops get involved. I recommend the cframe and size method it would work I assume. Would be good to test it out.