Open Asterune
Region3

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
Functions1
Members3
Properties2
Methods1
  • ExpandToGrid(resolution: number): Region3

    Returns the smallest region that contains this region and aligns to a grid with the specified resolution.

Constructors

new

Region3.new(min: Vector3, max: Vector3): Region3

Creates a region from two opposite corners. Corner order does not affect the result.

Properties

CFrame

Region3.CFrame: CFrame

A transform at the box center with no rotation.

Size

Region3.Size: Vector3

The box dimensions as a Vector3, in studs.

Methods

ExpandToGrid

Region3:ExpandToGrid(resolution: number): Region3

Returns the smallest region that contains this region and aligns to a grid with the specified resolution.

Operators

__eq · __tostring · __type

Example

Luau
local region = Region3.new(Vector3.new(-20, 0, -20), Vector3.new(20, 20, 20))

Used by

Terrain

Vector3 · CFrame · Workspace · Ray