As I work with numerous 3D models, I have noticed that many of them are not centered properly. Is there a method to determine the dimensions (length for x, width for z, height for y) of a model and divide it by two in order to accurately position the model?
let loaderDae = new ColladaLoader();
loaderDae.load(`model.dae`, (dae: any) => {
this.buildingModel = dae.scene;
// How can I calculate the center point of the model using its length, width, and height?
this.buildingModel.position.set(x_length/2, y_length/2, z_length/2);
this.sceneS.add(this.buildingModel);
});