I don’t know if it’s a bug, but cloning SkinnedMesh which is loaded from .glb file does not work for me. I see that in documentation three.js docs it is suggested to use SkeletonUtils.clone method, but it gives me an error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'matrixWorld')
. In console log I see that skeleton of cloned mesh has bones property as array of undefined objects. What I’m missing?
most likely it’s unhappy that the bones are not in the hierarchy of the object you are trying to clone (arms)
Specifically… you need to call SkeletonUtils.clone( ) on a node that contains Both the SkinnedMesh, and all the relevant Bones beneath it.
So…
TheScene–>[
Bone1,Bone2,Bone3,
TheSkinnnedMesh
]
will fail if you call SkinnedMeshUtils.clone( TheSkinnedMesh )
but will succeed if you call SkinnedMeshUtils.clone( TheScene )