I have a part where I would like to get the Region3 of the area inside of it. How can I do this using the part's properties (size, position and CFrame)? There is not a simple constructor for Region3s where you can just provide position and size, so I am confused how to calculate the two vector3s needed to make a region3, from a part's position cfame and size. Yes, I can place a brick at the corners of the part, and use that to figure out the Region3, however I would like to know how to do this from a script. Hopefully my question isn't too confusing.
✓ ANSWER ACCEPTED
How do I get a Region3 representing the volume of a part?
1 answer
✓ Accepted answer
You can use part.CFrame*(part.Size/2) and part.CFrame*(-part.Size/2) to get 2 opposite corners. If the part is rotated by something other than multiples of 90 degrees, though, then the resulting region will still represent an un-rotated box from one corner to the other.
This discussion is preserved as it was. New answers, comments, and votes are closed.
