How can I rotate my camera by dragging?


I am trying to create a situation where the camera is fixed and you can rotate the view by dragging your mouse. The object I’m working with is a room and I want to be able to look around while keeping the cursor enabled.

I tried using drei but could only succeed with PointLockControls and OrbitControls which are both not helpful since you cannot enable the cursor with PointLockControls and you cannot fix the camera position with orbit controls.

A small example in codesandbox would be super helpful. Thanks a lot!

Kind regards,

You should be able to get the fixed (first-person) camera by placing the target close to the camera - something like this.

1 Like