I’m trying to replicate Region3
(to satisfy my curiousity), especially its properties CFrame
and Size
.
I already know how to get the position and size
-- a and b are positions of two opposite corners in a rectangular prism
-- a is the lower part of the prism, while b is the upper part of the prism
local position = (a + b) / 2
local size = (2*position) - (2*a) -- or (2*b) - (2*position)
but I really don’t know how to get the rotation/orientation of the rectangular prism like how Region3 does. Keep in mind that I do NOT want to use Region3 since it will be cheating.
Thank you!