Static object get camera scale


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?


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( );
staticObject.translateZ(  (distance * -1 ) );