How to animate a switch between fps and orbit camera

I have to cameras in my test scene. One first person camera, and other orbit camera. I have a button that switches between them, and now i need to make that switch animated. I’d like it to look smooth just like in this example:
https://playcanvas.com/editor/scene/730255

my test scene:
https://playcanvas.com/editor/scene/851496

is that possible and how? I’d like to have a smooth interpolation between two positions of different camera types.

Hi @uros.rajsic, and welcome!

The easiest way to do that I think would be to animate the camera position (and if you like rotation as well) while doing the switch. Using tweens:

https://developer.playcanvas.com/en/tutorials/tweening/

So when you press the button you disable the active camera control script, then you start the tween animation and when that is over you enable the other camera control script.

That’s what we are doing in the animated orbit camera project:

https://playcanv.as/index/rgPDbmwa