Change between cameras

I’m creating an animation, and i want to see it from 2 different perspectives. I’ve created the two different cameras that I wanted. Is there an option to set a control to change between them.

See the doc from here: MultiViews Part 2 | Babylon.js Documentation

To change camera use the activeCamera property of the scene, and you can attach it to any GUI control, or shortcut.

If you has a controls for camera, you also should call attachControl to the canvas like here:

const switchCamera = (currentCamera, newCamera) => {
  newCamera.attachControl(canvas, true);
  scene.activeCamera = newCamera;
1 Like

Following your tips I was able to do it. Thank you soo much

1 Like