Class
GeometryService
NotCreatableService
Service containing geometric operations.
Service containing geometric operations not directly related to specific objects.
Methods 7#
| CalculateConstraintsToPreserve | Returns a table of Constraints and
Attachments which you may choose to preserve, along
with their respective parents. |
| FragmentAsync | Breaks a BasePart into multiple MeshPart instances,
according to the pattern of points passed in, by using voronoi
decomposition.Yields |
| GenerateFragmentSites | Provides an array of positions which can easily be passed into
FragmentAsync to perform simple types of destruction. |
| IntersectAsync | Creates one or more PartOperations or
MeshParts from the intersecting geometry of multiple
parts.Yields |
| SubtractAsync | Creates one or more PartOperations or
MeshParts from one part minus the space occupied by other
parts.Yields |
| SweepPartAsync | Creates a MeshPart which has the shape of the input part
stretched/dragged through the given set of CFrame positions.Yields |
| UnionAsync | Creates one or more PartOperations or
MeshParts from one part plus the space occupied by other
parts.Yields |
CalculateConstraintsToPreserve(source: Instance, destination: Array, options: Dictionary = nil): Array#
Returns a table of Constraints and
Attachments which you may choose to preserve, along
with their respective parents. Iterating over this table lets you decide
whether to reparent recommended constraints and attachments to their
respective parents.
For more information and detailed examples, see https://create.roblox.com/docs/parts/solid-modeling#in-experience-solid-modeling.
| Name | Type | Default | Description |
|---|---|---|---|
source | Instance | An original object that the solid modeling operation was performed on,
for example part in
UnionAsync(). | |
destination | Array | Array of resulting BaseParts from the solid modeling
operation, for example the results of
UnionAsync(). | |
options | Dictionary | nil | Options dictionary for the method:
|
Returns
Array—Table containing information for general case
Constraints,NoCollisionConstraints, andWeldConstraints. In cases where anAttachmentorConstraintshould be dropped, its respective parent will benil.For general case
Constraintssuch asHingeConstraint:Key Type AttachmentClass.AttachmentConstraintClass.ConstraintornilAttachmentParentClass.BasePartornilConstraintParentClass.BasePartornil
For WeldConstraints:
| Key | Type |
|---|---|
WeldConstraint |
Class.WeldConstraint |
WeldConstraintParent |
Class.BasePart or nil |
WeldConstraintPart0 |
Class.BasePart |
WeldConstraintPart1 |
Class.BasePart |
| Key | Type |
|---|---|
NoCollisionConstraint |
Class.NoCollisionConstraint |
NoCollisionConstraintParent |
Class.BasePart or nil |
NoCollisionConstraintPart0 |
Class.BasePart |
NoCollisionConstraintPart1 |
Class.BasePart |