Hi,
In my example, I’ve moved a copy of the model outside of gltfloader. I’m not sure if it’s right or wrong, but the size and location are correct.
const model = new THREE.Mesh();
scene.add(model);
const gltfBox = new THREE.Box3().setFromObject(model);
const helper2 = new THREE.Box3Helper(gltfBox, 0xffff00);
scene.add(helper2);
gltfLoader.load('https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Fox/glTF/Fox.gltf',(gltf) => {
gltf.scene.traverse((child) => {
gltf.scene.updateMatrixWorld(true);
if (child.isMesh) {
child.scale.set(0.03, 0.03, 0.03);
child.position.set(0, -1, 0);
child.rotation.y = -Math.PI * 4;
model.copy(child);
}
});
});
The problem is that box3 doesn’t work properly on the model.