Region3
Represents an axis-aligned box in world space.
Behavior
Region3 defines a box from two opposite corners. It cannot represent rotation.
Use it with region queries to find parts within a volume.
Summary
Constructors1
Members3
Properties2
A transform at the box center with no rotation.
The box dimensions as a Vector3, in studs.
Methods1
ExpandToGrid(resolution: number): Region3Returns the smallest region that contains this region and aligns to a grid with the specified resolution.
Constructors
new
Creates a region from two opposite corners. Corner order does not affect the result.
Properties
CFrame
Region3.CFrame: CFrameA transform at the box center with no rotation.
Size
Region3.Size: Vector3The box dimensions as a Vector3, in studs.
Methods
ExpandToGrid
Region3:ExpandToGrid(resolution: number): Region3Returns the smallest region that contains this region and aligns to a grid with the specified resolution.
Operators
__eq · __tostring · __type
Example
local region = Region3.new(Vector3.new(-20, 0, -20), Vector3.new(20, 20, 20))