3D Model transformation


I have two loaded glTF models, one is a character and another one is a belt. I am trying to “wear” this belt on a character, but it is too large and doesn’t fit perfectly. Is there a way to adjust a glTF model of the belt during the rendering, so it fits the character? I don’t even know where to start here (simple uneven scaling doesn’t satisfy the need).
Thank you in advance!

Anything you load and add to your scene will be an instance of classes like THREE.Object3D or THREE.Mesh. Usually glTF models contain multiple parts nested under one another. The methods on these classes are what you typically work with in moving/scaling/rotating the object.

There is no easy way to deform cloth to fit a character at runtime, you’ll probably want to do this ahead of time in software like Blender.

Unfortunately the character is loaded dynamically and I don’t know it’s size in advance.

Not going to be easy to fit items of clothing to unknown input models, or I’m not aware of out-of-the-box solutions. For a belt you might start with a straight/flat belt. Compute a path around the character’s waist and then deform the belt to that path, either with vertex modifications or by rigging the belt.