In my three.js scene I have an object with the {x: 0, y:0 z:-150}. My camera has a position of {x:0, y:0, z:75);. What I want is that the user can drag the camera around the object, so that the user keeps looking at the object.
The camera needs to follow the given circle stroke on a drag to the left or to the right.
I tried to use OrbitControls and a pivotPoint to get this result:
const controls = new OrbitControls( camera, renderer.domElement );
controls.update();
object.position.set(0, 0, -150);
pivotPoint = new THREE.Object3D();
object.add(pivotPoint);
camera.position.set(0, 0, 75);
camera.lookAt(object.position);
The problem I have now is that the camera rotates around itself and not around the object.
