Camera control like in 3D application

Related question:


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)
...

The same happens with a FreeCamera.