Improve experience of camera control

As another end user, I agree with this.
Most of my code contributions to Babylon so far have revolved around camera control.

I’ve used Babylon for 2 personal projects so far and both times i’ve been surprised by the lack of camera control functionality.
I’m not trying to pick on Babylon here; It’s a great project.
But camera control is a weak area.
Cameras are something everybody uses. Any improvements here benefit /every/ user of Babylon.
They are also one of the first concepts a new user needs to work out so a simple set of defaults would help catch new users.

A case study:
~2-3 months ago i picked Babylon up again to demo a concept i was playing around with.
Getting the cameras right took as much time as the rest of the demo. By default you have to use a clunky combination of mouse and keyboard to get around a Scene.

I submitted Mouse wheel control for FreeCamera and derivatives. by mrdunk · Pull Request #9056 · BabylonJS/Babylon.js · GitHub which adds MouseWheel support to the FreeCamera and derivatives.
This made my demo and everyone else who uses FreeCamera from now on more usable but there is still very little customization available for other aspects of this camera.
I still wanted other non-standard inputs; An interface not unlike online map programs: Mouse or Touch Screen drags will move the camera over a map, irrespective of the camera angle.
I’ve had to write my own from scratch. I presume everyone has to write their own camera control code at some stage of their project.

For anyone that’s interested, here’s my FreeCamera controll code: flowing-terrain/freeCameraPointersInput.ts at master · mrdunk/flowing-terrain · GitHub
It’s highly configurable; You can make any axis of a pointer device control any axis of the camera.
I’d like to submit it for inclusion in babylon but it still needs work on getting the UI intuitive enough.

Another perspective:
https://forum.babylonjs.com/t/is-there-an-option-to-rotate-a-universalcamera-with-left-right-arrows/16133/3

1 Like