Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Multiple cameras, each of one renders another set of GameObjects

Discussion in 'Editor & General Support' started by andybe, Jul 22, 2014.

  1. andybe

    andybe

    Joined:
    Nov 15, 2013
    Posts:
    14
    Howdy!

    There are two cameras I want to use. One renders all the game objects at the borders of a scene (sort of a GUI, though cannot use the Unity's GUI), the second camera should render the actual level contents "in the middle" of the scene, i.e. in a viewport that is smaller to the screen size.

    I understand, that the camera has a viewport that can be lesser to the screen size.

    However, at this moment, I would probably wish to tell Unity, that camera A should render the set of game objects A, and camera B should render the set of game objects B.

    Possible?
    Thank you

    P.S. 've been searching already, yet no answer
     
  2. andybe

    andybe

    Joined:
    Nov 15, 2013
    Posts:
    14
    ..might probably put the "gui" and the "level" objects to coordinates, where the views (frustums) of camera A and B do not intersect, well...
     
  3. trololo

    trololo

    Joined:
    Dec 13, 2012
    Posts:
    17
    Set the differents kind of objects (border and middle) on two different layers, and set the culling mask of each camera in order to see only one type of layer.
     
  4. andybe

    andybe

    Joined:
    Nov 15, 2013
    Posts:
    14
    Thank you, now I know that there exist rendering layers. Will make it:)