Static object get camera scale

Hi,

I use OrbitControls to rotate around an object / target. Next to the target there´s a second Object3D which should remain static whilst rotating, which works fine like this:

staticObject.quaternion.copy(this.controls.object.quaternion); staticObject.position.copy( this.controls.object.position ); staticObject.translateZ( -70 );
The problem is, when I now dolly in/out (mousewheel) using the OrbitControls, the staticObject is not scaled as well…

Any tip what I´m missing or how I can achieve this?

Thanks
b

Solved it → I calculated the distance from camera to the object it is orbiting and used it as value for translateZ

let vector = new THREE.Vector3();
vector.setFromMatrixPosition( this.objWeOrbitAround.matrixWorld );

let distance = vector.distanceTo( this.camera.position );
staticObject.translateZ(  (distance * -1 ) );