I am trying to do an equipment system where there are interchangeable clothing items that get instantiated onto the player as they are equipped, as is standard in most RPGs. So far I’ve got the position of the clothing after they’re instantiated fine, but I can’t figure out how to get the clothing to animate.
I’ve read that I should set the root bone of my clothing object’s skinned mesh renderer to the root bone of my character. However, that seems to only allow the transforms of the root bone that I assign (the “hips” bone in this case) to actually affect the mesh. Sometimes it even causes weird offsets in the position of the mesh as well. I’m hoping I’m just misunderstanding something here, because I can’t understand why it wouldn’t work. Both the character and the clothing mesh were made with the same skeleton.
Am I going about this in the wrong way? There are only two other options I can think of. Copying all of the character skeleton’s transforms to a skeleton that is on the clothing object (or parenting the clothing’s bones to the character’s), but that seems fairly complicated and inefficient. The second one being to play the same animation on each clothing object. That would mean having multiple skeletons animating at the same time, and wouldn’t that cause a bit of a performance hit?
Been frustrating the past few days trying to figure this out with everything else in my game going relatively smoothly, and maybe I’m just overthinking it. Just thought I’d ask here for advice before I bite the bullet and just go with option #2 that I listed.