There is much underlying magic to the Touch Camera, but like everything else in Babylon.js, we make it easy and enjoyable for you.Here is how to construct a Touch Camera: The Touch Camera uses a Free Camera as its basis, so all the powerful properties and methods of our familiar Free Camera... You can explore all the properties and methods available on the Touch Camera... The Device Orientation Camera also uses a Free Camera as its basis, so all the powerful properties and methods of our familiar Free Camera... There are two rather important properties on the Device Orientation Camera: Follow a mesh through your scene // Parameters : name, position, scene var camera = new BABYLON. Vector3(0, 15, -45), scene); camera.target = my Mesh Object; // target any mesh or object with a "position" Vector3 The code above...
Here is how to construct a Virtual Joysticks Camera: The Virtual Joysticks Camera also uses a Free Camera as its basis, so all the properties and methods of our familiar Free Camera... We have a special tutorial dedicated to the Virtual Joysticks Camera. You can learn all about anaglyphs by visiting a Wikipedia page that explains it thoroughly.
In any scene, you can create as many cameras as you wish, but only one camera can be active at a time (unless you are using multi-viewports).
Camera management in is pretty simple : first you create one of the camera listed below, then you attach it to canvas mouse and touch inputs (see Wrapping Up section). We will begin with the two most-common types - the Free Camera and the Arc Rotate Camera.
Ironically, there is no rotation property on an Arc Rotate Camera, but there is a position property. Arc Rotate Camera("Arc Rotate Camera", 0, 0, 0, BABYLON. Zero(), scene); // Quick, let's use the set Position() method... So once you have set your arc Camera as the scene.active Camera (see further below), you can send your Arc Rotate Camera gently orbiting around your target...