Hello!
I want to change my FlyByCam, which is obviously flying over an area, to change on left mouse button click to the MainCamera. I tried working with camera.main.Depth and stuff ike that but that didn’t seem to work. So I came up with this script from a similar other post. It just doesn’t seem to work. It won’t switch when I left click this way. I tried similar ways of figuring out on how to make it switch, but also putting it in Update just automatically puts it on MainCamera.
#pragma strict
var camera1 : Camera;
var camera2 : Camera;
function OnMouseDown() {
camera1.enabled = true;
camera2.enabled = false;
}
To ask it more clearly:
Does anyone have a suggestion on how to switch from the FlyByCam to the MainCamera with only one left mouse button click?
Thanks in advance!