I am brand new to ThreeJS and currently trying to incorporate it into my web application. I have encountered a problem with configuring the camera.
Currently, I have a perspective camera that is able to look at and move in every direction within my scene.
However, I want the camera to be able to only look at every point (left, right, up, and down) without being able to physically move at every point, especially on the X and Y axes (what I mean is the distinction between movement and looking – they should not behave the same). The intention is for the camera to only be able to move along the Z axis (depth).
Below is the code snippet for my camera:
this.camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);