Search Unity

Use one Camera to handle orthographic and perspective views

Discussion in 'Cinemachine' started by Deadcow_, Feb 18, 2020.

  1. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    In our game there is two modes, top-down-orthographic and first-person-perspective

    I don't need to use transitions between orthographic and perspective cameras, but I'd like to use one cinemachine brain for both, is this possible?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,717
    If you have a single camera with a CM brain, you can just change its mode from perspective to ortho, and CM will continue to work.

    Alternatively, you can have 2 cameras, each with a CM brain. If you ensure that only one is ever active at any one time, then CM will work normally. Vcams can be controlling multiple brains - they have no specific affinity, unless you use the camera culling mask to filter by layer.

    Is there any specific reason why you want to have only one CM brain?
     
  3. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    No, I just was thinging there is should be one brain to control all VCams. For now I made two cameras, but maybe I'll change it to one camera with projection mode changed dynamically via script. Just trying to check all possibilities before choosing one.

    Thanks for the response!