Search Unity

Controling multiple cameras

Discussion in 'Scripting' started by game4tress, Feb 3, 2013.

  1. game4tress

    game4tress

    Joined:
    May 13, 2010
    Posts:
    46
    I'm developing a game that should start with the "Main Camera", show a countdown and then let the player control the spaceship. When this happens the active camera should be the one inside one of the spaceships (depending on the chosen spaceship).
    I've tried a lot of scripts I found on the internet but none of them worked, and I don't know why they didn't work.
    It seems that the active camera in Unity3d is always the last camera placed on the level, but I can't change this!
    Is it possible to change cameras? How?

    My thanks in advanced
     
  2. FlyingAce

    FlyingAce

    Joined:
    Jan 12, 2013
    Posts:
    58
    In the camera settings there's a value called "depth" the active camera in the scene is the one with the highest depth. Unity just decides that if 2 cameras have the same depth the newer one is active

    Just changed this value and it should work.
    Hope this helps! :D