Search Unity

Blending between cameras - 2nd camera doesn't rotate back to 1st's rotation

Discussion in 'Cinemachine' started by BlanketsWilson, Jul 12, 2019.

  1. BlanketsWilson

    BlanketsWilson

    Joined:
    Jan 8, 2017
    Posts:
    11
    Hey everyone, this might be a specific question/problem but hopefully, it can be fixed.

    This is going to be easiest to show with a video.



    So basically, when the player walks up to the computer and presses the T key - I use a PlayMaker trigger to turn off the first person camera and turn on a camera that's statically locked onto the computer - if T is pressed again the camera blends back out to the first person camera.

    The PROBLEM is that when the camera blends back out, it doesn't rotate to the position is started in. So if the player presses T (like I do in the video) the camera is super wonky when it blends back out because it's shifted from the player's view. I try to show this is the video.

    Hope someone can help.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    That shouldn't happen.
    Can you post an image of your hierarchy, with the vcams and main camera visible? Also images of the 2 vcam inspectors. I need to understand how you've set up the scene before I can answer you.
     
  3. BlanketsWilson

    BlanketsWilson

    Joined:
    Jan 8, 2017
    Posts:
    11
    Here's the hierarchy first.
    hierarchy.JPG



    Cm vcam 1
    CM vcam1.JPG

    Computer camera (static camera looking at the computer)
    Computer camera.JPG
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    The problem is the hierarchy. The vcams should not be parented to the main camera. Make them separate objects. Siblings are fine.
     
  5. BlanketsWilson

    BlanketsWilson

    Joined:
    Jan 8, 2017
    Posts:
    11
    It worked! Thank you so much.
     
    Gregoryl likes this.