Swapping two cameras with each other

How can I change the camera in the minimap and the main screen camera by clicking the button. I can change it now, but I’m encountering some errors. I request your help.

New Engine in progress | Babylon.js Playground (babylonjs-playground.com)

I am not sure I fully understand your request. Do you want to change the view of the camera in the main scene? Use a different type of camera? Or do you want to add controls to your minimap camera when you click on it so to be able to interact with the view from the minimap?

Edit: Quickly did this change in your PG, to show the base of how changing the camera in the main scene. Though there are lots of other errors in this scene. I didn’t check what those are.