My camera is at [0,0,100] and looks at [0,0,0] where RED point [0,0,0] is the center point.
I want to pan the camera so that BLUE point [100,100,0] will be in the center. It is obvously to do using the mouse. However how to do it by code please?
Since you’re mentioning that you’re using OrbitControls(), you’ll probably have to set this as well, so the blue sphere stays in the center even as you apply rotations via your input device:
controls = new OrbitControls( camera, renderer.domElement );
...
controls.target = new THREE.Vector3( 100, 100, 0 );