Hi. I’m trying to use a skeleton from one skinnedmesh, and apply the exact same skeleton to another skinnedmesh. Unfortunately, I tried the below method, but the bones inside the skeleton aren’t binded correctly.
I guess one difference is that the original skinnedmesh is imported from VRM import, and the new skinnedmesh is imported from a gltf import.
public replaceSkeleton( originalMesh: THREE.SkinnedMesh, newMesh: THREE.SkinnedMesh ): void {
newMesh.skeleton = originalMesh.skeleton.clone();
newMesh.bind( newMesh.skeleton );
}
What’s interesting is that the new skinnedmesh is correctly displayed over the bones at rest pose. However, when motion such as bone rotation is added, only a few bones are moving correspondingly. When I console log the skinnedmesh, it actually has all the bones inside its skeleton.bones.
Has anyone found a similar issue? Why a skeleton from a skinnedmesh can’t be interchanged 100% with another skinnedmesh?
Below is a video of the issue.