Class
WrapDeformer
Allows for the real-time deformation of a MeshPart.
The WrapDeformer object provides a low-resolution cage mesh that pairs
with a WrapTarget sibling to deform a parent MeshPart. The
MeshPart geometry is deformed according to the displacement between
pairs of WrapTarget cage mesh vertices and WrapDeformer cage
mesh vertices. Cage mesh vertices are paired based on UV equivalence.
WrapDeformer may be used with avatars or on distinct
MeshParts, as long as WrapTarget children are present
for the parent MeshParts. WrapDeformer is similar to
WrapLayer but doesn't require layered clothing and can directly deform
MeshParts for publishing.
Methods 3#
| CreateEditableMeshAsync | Returns an EditableMesh (currently unskinned) equivalent to the
deformed parent mesh.Yields |
| GetDeformedCFrameAsync | Returns a CFrame deformed comparably to the MeshPart.Yields |
| SetCageMeshContent | Sets the cage mesh used to deform against a sibling WrapTarget
cage mesh. |
CreateEditableMeshAsync(): EditableMesh#
Yields
Constructs and returns an EditableMesh corresponding to the
deformed parent mesh geometry. This method respects all updates made to
the deformation inputs prior to the request. It also sets the returned
result's FixedSize to true.
Returns
EditableMesh— AnEditableMeshmatching the deformed parent mesh geometry, with itsFixedSizeset totrue.
GetDeformedCFrameAsync(originalCFrame: CFrame): CFrame#
Yields
Returns a CFrame deformed by the same deformation field used
for the geometry of the parent MeshPart. This method is useful for
the placement of accessories.
The input and output CFrame are both in the space of the parent
MeshPart; only position (not rotation) will be deformed. This
method respects all updates made to the deformation inputs prior to the
request.
SetCageMeshContent(content: Content, cageOrigin: CFrame?): ()#
Sets the cage mesh used to deform the parent MeshPart in
conjunction with a sibling WrapTarget cage mesh. The content
parameter should represent a Roblox mesh asset ID or an
EditableMesh reference in your DataModel.
| Name | Type | Default | Description |
|---|---|---|---|
content | Content | A Roblox mesh asset ID or an EditableMesh reference specifying
the cage mesh to deform against the sibling WrapTarget. | |
cageOrigin | CFrame? | An optional CFrame, in the parent MeshPart space,
that sets the cage's CageOrigin. When
omitted, the existing CageOrigin is left
unchanged. |
Returns
()
Inherited members#
Inherited from BaseWrap 8
Properties (8)
CageMeshContent, CageMeshId, CageOrigin, CageOriginWorld, HSRAssetId, HSRContent, ImportOrigin, ImportOriginWorld
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild