I’m new to BabylonJS, and i have to say that so far, the development experience has been great. Also the documentation is top notch! …I’d like to ask one question though:
Is there a specific camera preset or snippet that makes the UniversalCamera feel like a camera out of a 3D application like Blender or Maya?
I understand that the default behavior is geared towards gaming, but it seems to me that i wouldn’t be the first one who wants to use the canvas more like a OpenGL viewport from an application like Blender or Maya, am i? Specifically i want to:
rotate with alt+lmb
stafe with alt+mmb
zoom with alt+rmb
Just like the Blender cam when set to Industry compatible mode. I don’t need any gaming related features like walking feel-alike behavior, collision detection etc.
How can I frame with a UniversalCamera or FreeCamera?
This was very comfortable using the FramingBehavior of an ArcRotateCamera.
So the documentation leads me to believe that UniversalCameras implement the BehaviorInterface and they also have an addBehavior() method, however when I try universalCamera.addBehavior(new FramingBehavior()) I get an error:
ERROR TypeError: Cannot read property 'add' of undefined
at FramingBehavior.push../node_modules/@babylonjs/core/Behaviors/Cameras/framingBehavior.js.FramingBehavior.attach (framingBehavior.js:198)
at UniversalCamera.push../node_modules/@babylonjs/core/node.js.Node.addBehavior (node.js:248)
at SceneManager.setupUniversalCamera (scene-manager.ts:365)
...
Thanks @JohnK this looks like it would provide the building blocks to implement the desired behavior, in case there is not yet a canonical implementation/snippet floating around. Had seen inputs previously and briefly but was under the impression that it was mostly useed to enable input methods like Gamepad etc. …hadn’t realized it’s whole potential.
As it seems there is no ready-made preset for this case, if there is a feature wishlist or so (github issues?) i’d throw in the idea of a specific new EditorCamera camera type next to FlyCamera, FollowCamera etc. that behaves exactly like a Maya or Blender Industry Compatible camera to navigate 3D scenes for editing. (Or is there a reason why this shouldn’t exist?)