RotatedRegion3
Types
ShapeType
type ShapeType = "Ball" | "Block" | "CornerWedge" | "Cylinder" | "Wedge"The RotatedRegion3's shape.
SupportFunction
A support function.
Properties
CFrame
RotatedRegion3.CFrame: CFrameA CFrame that represents the center of the region.
Size
RotatedRegion3.Size: Vector3A Vector3 that represents the size of the region.
Shape
RotatedRegion3.Shape: ShapeTypeA string that represents the shape type of the RotatedRegion3 object.
Set
An array of Vector3s that are passed to the support function.
Support
RotatedRegion3.Support: SupportFunctionA function that is used for support in the GJK algorithm.
Centroid
RotatedRegion3.Centroid: Vector3A Vector3 that represents the center of the set, again used for the GJK algorithm.
AlignedRegion3
RotatedRegion3.AlignedRegion3: Region3A standard Region3 that represents the world bounding box of the RotatedRegion3 object.
Functions
new
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a block part.
Block
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a block part.
info
This is the exact same as the RotatedRegion3.new constructor.
Wedge
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a WedgePart.
CornerWedge
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a CornerWedgePart.
Cylinder
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a cylinder part.
Ball
Creates a region from a CFrame which acts as the center of the region and size which extends to the corners like a ball part.
FromPart
Creates a region from a part in the game. It can be used on any base part, but the region will treat unknown shapes (meshes, unions, etc) as block shapes.
CastPoint
Returns true or false if the point is within the RotatedRegion3 object.
CastPart
Returns true or false if the part is within the RotatedRegion3 object.
FindPartsInRegion3
RotatedRegion3:FindPartsInRegion3(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}
Returns array of parts in the RotatedRegion3 object. Will return
a maximum number of parts in the array. Parts that either are are
descendants of or are the IgnoreDescendantsInstance will be ignored.
info
You should instead use RotatedRegion3.GetPartsInRegion instead. It's slower but it's using a newer API.
FindPartsInRegion3WithIgnoreList
RotatedRegion3:FindPartsInRegion3WithIgnoreList(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Returns array of parts in the RotatedRegion3 object. Will return a maximum number of parts in the array. Parts that either are descendants of the IgnoreList or are actually in the IgnoreList will be ignored.
info
You should instead use RotatedRegion3.GetPartsInRegionWithIgnoreList instead. It's slower but it's using a newer API.
FindPartsInRegion3WithWhiteList
RotatedRegion3:FindPartsInRegion3WithWhiteList(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Returns array of parts in the RotatedRegion3 object. Will return a maximum number of parts in the array. Parts that are not either descendants of the Whitelist or are actually in the Whitelist will be ignored.
info
You should instead use RotatedRegion3.GetPartsInRegionWithWhitelist instead. It's slower but it's using a newer API.
GetPartsInRegion
RotatedRegion3:GetPartsInRegion(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}
Returns array of parts in the RotatedRegion3 object. Will return
a maximum number of parts in the array. Parts that either are are
descendants of or are the IgnoreDescendantsInstance will be ignored.
Uses Workspace.GetPartBoundsInBox instead of Workspace.FindPartsInRegion3.
GetPartsInRegionWithIgnoreList
RotatedRegion3:GetPartsInRegionWithIgnoreList(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Returns array of parts in the RotatedRegion3 object. Will return a maximum number of parts in the array. Parts that either are descendants of the IgnoreList or are actually in the IgnoreList will be ignored.
Uses Workspace.GetPartBoundsInBox instead of Workspace.FindPartsInRegion3.
GetPartsInRegionWithWhiteList
RotatedRegion3:GetPartsInRegionWithWhiteList(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Returns array of parts in the RotatedRegion3 object. Will return a maximum number of parts in the array. Parts that are not either descendants of the Whitelist or are actually in the Whitelist will be ignored.
Uses Workspace.GetPartBoundsInBox instead of Workspace.FindPartsInRegion3.
Cast
RotatedRegion3:Cast(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Same as the RotatedRegion3.FindPartsInRegion3WithIgnoreList method, but will check if the ignore argument is an array or single instance.
info
You should instead use RotatedRegion3.Cast instead. It's slower but it's using a newer API.
CastInBox
RotatedRegion3:CastInBox(MaxParts: number?--
The maximum number of parts to return. Defaults to 20.
) → {BasePart}Same as the RotatedRegion3.GetPartsInRegionWithIgnoreList method, but will check if the ignore argument is an array or single instance.