Showing equipment on character

Hi everyone!

I tried to prepare a nice jsfiddle but can’t make it work because I don’t know where to host the model files without getting an cors error. So here is the code, but it doesn’t display anything.

I am using Quaternius’ nice knight model from Quaternius • Animated Knight Pack.

I can load the knight model, have it run around etc. But now I am trying to correctly place the helmet on the head, the sword in the hand etc, and I can’t make it work.

My first try was adding it to the corresponding bone:

const knight = models['knight']
knight.traverse((obj) => {
    if (obj.name === 'Head') {
        obj.add(models['knight-Helmet2'])
    }
})

But then the helmet gets scaled x100 from the knight model. If I then scale down the helmet manually it’s still not in the correct position.

Is this model simply not made for this and usually this would be the correct way, or am I doing it wrong? How does one properly add a piece of equipment to a character mesh?

Thanks!
Michel

Your approach is definitely right. Meaning if you want to add something to a character’s hand, you usually want to child-parent relationship between the item and the hand. In this way, all transformations of the hand also apply to the item.

I always find it strange when skeletons contains scaling. To me, that is a modeling error. You probably want to import the character in Blender, fix the transformation and then export to glTF.

1 Like

Okay, that’s great to know, thank you so much!

Its like this