# Change between cameras

**URL:** <https://forum.babylonjs.com/t/change-between-cameras/39093>\
**Category:** Questions\
**Created:** [March 16, 2023, 2:08pm UTC](https://forum.babylonjs.com/t/change-between-cameras/39093 "2023-03-16T14:08:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darth\_Luis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darth_luis/32/30595_2.png) [@Darth\_Luis](https://forum.babylonjs.com/u/Darth_Luis)\
**Post date:** [March 16, 2023, 2:08pm UTC](https://forum.babylonjs.com/t/change-between-cameras/39093/1 "2023-03-16T14:08:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dok11](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dok11/32/25754_2.png) [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Post date:** [March 16, 2023, 2:59pm UTC](https://forum.babylonjs.com/t/change-between-cameras/39093/2 "2023-03-16T14:59:43Z")

</div>

See the doc from here: [MultiViews Part 2 | Babylon.js Documentation](https://doc.babylonjs.com/features/featuresDeepDive/cameras/multiViewsPart2)

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:

```js
const switchCamera = (currentCamera, newCamera) => {
  currentCamera.detachControl(canvas);
  newCamera.attachControl(canvas, true);
  scene.activeCamera = newCamera;
};

```

---

<div class="post-metadata">

**Author:** ![Darth\_Luis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/darth_luis/32/30595_2.png) [@Darth\_Luis](https://forum.babylonjs.com/u/Darth_Luis)\
**Post date:** [March 21, 2023, 9:00am UTC](https://forum.babylonjs.com/t/change-between-cameras/39093/3 "2023-03-21T09:00:42Z")

</div>

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