Hello,
I’m a beginner in three.js working with react-three-fiber and I’ve noticed that by default, the orbital controls essentially rotate the camera position around a given a point. What I’d like to achieve instead is controls that emulate real-life head movement, where the camera would be fixed in place and the controls would only change the direction that it’s facing. Is there any way to achieve this? I’ve tried disabling pan and zoom but that didn’t seem to achieve the desired effect.
const OrbitCameraControls = () => {
const {camera, gl} = useThree();
useEffect(() => {
const controls = new OrbitControls(camera, gl.domElement);
controls.enablePan = false;
controls.enableZoom = false;
return () => {
controls.dispose();
}
}, [camera, gl]);
return null
}