Skip to content

Bounds

Represents a bounding box in 3D space.

Not newable

This object cannot be created by scripts using Instance.New().

Properties

Center : Vector3

Indicates the center point of the bounds.

Size : Vector3

Determines the size of the bounds.

Extents : Vector3

Indicates the extents of the bounds.

Start : Vector3

The origin point

End : Vector3

The ending point

Volume : number

Indicates the volume of the bounds.

Methods

New → Bounds

Parameters: ``

Creates a new Bounds object with the specified position and size.

New → Bounds

Parameters

position [ Vector3 ]

size [ Vector3 ]

Creates a new Bounds object with the specified position and size.

ClosestPoint → Vector3

Parameters

bounds [ Bounds ]

point [ Vector3 ]

Calculates the closest point on the bounds to the specified point.

Contains → boolean

Parameters

bounds [ Bounds ]

point [ Vector3 ]

Returns whether the bounds contain the specified point.

Encapsulate → Bounds

Parameters

bounds [ Bounds ]

point [ Vector3 ]

Expands the bounds by the specified amount.

Expand → Bounds

Parameters

bounds [ Bounds ]

amount [ number ]

Expands the bounds by the specified amount.

Intersects → boolean

Parameters

bounds [ Bounds ]

other [ Bounds ]

Determines whether the bounds intersect with another bounds.

SetMinMax → Bounds

Parameters

bounds [ Bounds ]

min [ Vector3 ]

max [ Vector3 ]

Sets the minimum and maximum points of the bounds.

Distance → number

Parameters

bounds [ Bounds ]

point [ Vector3 ]

Calculates the distance from the bounds to the specified point.

SqrDistance → number

Parameters

bounds [ Bounds ]

point [ Vector3 ]

Calculates the squared distance from the bounds to the specified point.