I want to create a custom mesh using the EditableMesh class, and then move that mesh around using a WrapDeformer instance.
This is my first time messing with WrapDeformers so I don’t know the specific ins and outs of how they work, but from what I’ve picked up you need a WrapDeformer and a WrapTarget parented to a MeshPart, with the WrapDeformer using a cloned version of the WrapTargets mesh which you can then move around with a script.
If the CageMesh you’re using is already uploaded to Roblox then it’s very easy to do; Just plop the asset id into the WrapTarget and then run
local CageMesh = AssetService:CreateEditableMeshAsync(WrapTarget.CageMeshContent)
WrapDeformer:SetCageMeshContent(Content.fromObject(CageMesh))
inside your script.
However the problem occurs whenever I need an EditableMesh as the WrapTargets mesh, as there doesn’t seem to be a way to insert the mesh object into the WrapTarget with all the mesh values having PluginSecurity and no WrapTarget:SetCageMeshContent()
methods seemingly existing.
How would I apply a EditableMesh to a WrapTarget? Or is there another way to do what I’m trying to do?
Answers would be greatly appreciated. I’ll try to stay active over the next couple of hours if anyone needs me to elaborate on anything.