I am trying to animate a Ready Player Me avatar. but I only want to delete one of the hands, and only show and move the “dominant hand” in a setting where there is one mouse pointer.
The Ready Player Me avatar is in a GLB file, and when loaded it created a structure with Bone instances, and SkinnedMesh.
code like this:
let otherHand = theModel.getObjectByName(“LeftHand”);
otherHand.removeFromParent();
still renders the otherHand in the space, though detached from the Spine. So the otherHand stays at a position even when the avatar moves.
I think the question is: "Is there a clean way to remove one part from a model with Bones and SkinnedMesh?
Did you re render the scene after changing the attribute?
Also i think the method your using removes
/detaches from parent but does not delete. That probably why the object stays in place. Here is a thread on removing from scene. Scene.remove()
Rendering happens every display cycle, so yes, it is re-rendered.
One thing I would like to mention again is that this is model consists of Bones and a SkinnedMesh. I have not dug in the code of SkinnedMesh but I imagine that the boneTransform() of SkinnedMesh needs to exclude the corresponding parts.