Get position of object based on its center

I have a group with gltf scene inside of it. From what I see the positionning of the object is not based on its center. So I need to find for some reasons the center of this group and its center based position in the scene.

I’ve tried (pseudo-code)

const center = bbox.getCenter( new THREE.Vector3())
const centerPosition = new THREE.Vector3( obj.position.x + center.x, obj.position.y - center.y)

but it doesn’t seem to work.

Any ideas? Thanks in advance.

Not sure if it’s the same problem, but check this out from the
Collection of examples from discourse.threejs.org .

BeginnerExample step3
LoadGLTFmove

@hofk Thank you I’ve managed to make it work, my logic was good except I was updating the position elsewhere without adding the center. Thank you

let bbox = new THREE.Box3().setFromObject( your_object );
let bcenter = bbox.getCenter();