loader.load(
url,
(mesh) => {
const sceneModel = mesh.scene || mesh
sceneModel.traverse(child => {
if (child.isMesh) child.castShadow = true
if (child.material) child.material.metalness = 0
})
const boxHelper = new BoxHelper()
boxHelper.setFromObject(sceneModel)
scene.add(boxHelper)
})
Try console logging value of sceneModel
- and see what you’re wrapping the box around.
Also, iirc, skeleton animations / armatures can break box helper a bit if the keyframe animation modifies the scale of the model.
Hello, the models here are not animated,by the way,I used the camera-control plugin, which has a fitToBox method that allows different models to automatically center and scale, but how do I adjust this abnormal model?
1.0风格女5.glb (1.4 MB)
This is an abnormal model. Can you take a look at it? Thank you