Search Unity

How To Blend Unity Camera With Cinemachine Virtual Camera.

Discussion in 'Cinemachine' started by goharjaved, Apr 15, 2019.

  1. goharjaved

    goharjaved

    Joined:
    Aug 3, 2014
    Posts:
    3
    I am working on construction game. In which unity main camera follows the vehicle using smooth follow script. i want to show some cinematic when vehicle enter into the building. The problem how can i blend cinemachineexternalcamera with CV cameras using timeline.Please help how can i fix this issue.
     
    Last edited: Apr 15, 2019
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    The best-practice is to never animate the main camera. Work with Virtual Cameras instead. It is not necessary to use CinemachineExternalCamera, and don't introduce a second Camera into the scene.

    In your smooth follow script, replace the main camera with another object: a CM virtual camera with Do Nothing in Aim and Body. Putting Do Nothing there turns off the procedural animation and allows the vcam's transform to be animated by your script. When that vcam is active, the main camera (with the CM brain) will track it exactly.

    When your cinematic starts, enable another vcam from timeline, and that will take control while the timeline is active. When the timeline ends, control will be passed back to your normal vcam. Transitions can be cuts or blends.
     
    pango likes this.
  3. goharjaved

    goharjaved

    Joined:
    Aug 3, 2014
    Posts:
    3
    Thanks for your Swift response. You really solve my problem Thanks.
     
    Gregoryl likes this.