Camera rotation and zoom without Orbit Control


I try to place a camera at 0,0,0 which I can rotate in every direction and zoom, similar to orbit control.
My goal is not to use orbit control as I can not rotate around a static point and have issues zooming (I can zoom out as far as I want but I can not zoom in).

My idea was to use a camera and write custom controls, but I guess as I am not the first person facing that problem there might be a ready to use solution I am not aware of?

Thanks in advance!

Here is a little airplane demo that shows two camera views - one outside the airplane looking in (like OrbitControls) and one inside the airplane looking out. You can use the arrow keys to rotate the airplane and the ā€œVā€ key to switch between views. I have not added a basic interior view yet - you are just sitting a little bit above the wing. But you can use the mouse to look around.

I tried to create a CodePen demo, but - for some reason - the keyboard input would not work and it is late.

that airplane demo loads up with a 403 forbidden error :frowning:
would love to learn from you :slight_smile:

Why not use orbitcontrols? If you set its .target to the camera position, the camera will rotate around its own center.
Handling the rotation is tricky, and orbitcontrols does it well including with damping.
You can disable its zoom behavior and create your own wheel listener for zoom.
You can do something like:

control.enableZoom = false;
let move=new THREE.Vector3(0,0,event.deltaY*.01).applyQuaternion(camera.quaternion);