Following is existing code to move the camera to a certain position (note that cameraControl is an instance of CameraControl class):
cameraControl.dollyTo(label.cam[5], true); cameraControl.setPosition(label.cam[2], label.cam[3], label.cam[4], true); cameraControl.setFocalOffset(label.cam[6], label.cam[7], 0, true); cameraControl.rotateTo(label.cam[1], label.cam[0], true);
Supposely after the above operations, my camera has moved to position p1, with rotation r1 and quarternion q1
My goal is not to use CameraControl to get the same view i.e. same p1, r1 and q1. Is it possible to achieve that?
I tried this to set the position
let vec = new THREE.Vector3(label.cam[2], label.cam[3], label.cam[4]);
cameraRef.current?.position.copy(vec);
but this doesn’t make the camera’s position same as what camera control did.
Thank you for any help.