Hi guys. I’m trying to load a gltf with only one skeleton with animations and attach some meshes in the scene to different bones of the skeleton. is this possible? The meshes dont need to be skinned meshes because I don’t need to animate vertices for now.
Here is something that might be related. I load the model (it already has a skinned mesh), but I also manually add a sphere to one of the foot bones. This is then used to calculate and visualise a collision boundary.
My demo is more than you are asking for, but it shows that Bones are Object3Ds, so that means you can add another Object3D to them.
With a little bit of extra code, in my traverse,
if ((child as THREE.Bone).isBone) {
child.add(
new THREE.Mesh(
new THREE.SphereGeometry(5),
new THREE.MeshNormalMaterial({ wireframe: true })
)
)
}
I can add spheres to each bone, and they will stay attached when the model animates.