Move Camera Smothly to a group center

Hi guys,
I have different groups in my model.
How can I move the camera smoothly above center of my group?
I have to calculate the center of the group with a bounding box? for the moving camera what do you suggest?

You can use GSAP or tweenjs to animate things.
To calc the center of a group with boundingbox,

let bounds = new THREE.Box3().setFromObject( group );
let center = new THREE.Vector3();
bounds.getCenter(center);
1 Like