Search Unity

Cinemachine brains sporadically reset camera position

Discussion in 'Cinemachine' started by reinfeldx, Mar 22, 2019.

  1. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    I've been working with Cinemachine for about a month, and I'm puzzled at this behavior.



    It seems that when I exit play mode, the cameras with Cinemachine brains sometimes reset their positions and are unable to be moved. When I reenter play mode, everything seems fine. I haven't been able to discern a pattern in terms of when/why it occurs.

    Am I doing something wrong? It's especially problematic because I can't edit my VCams when the brain cameras lock up.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    You seem to have your structure wrong.
    Take the Camera with the Brain out of the player truck, and make it an unparented game object. The brain will take care of tracking the current active vcam.
    Do the same thing with the vcam. It has logic to track the target, and should not be parented to the moving object.
     
  3. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Thanks, but I've changed the structure as you suggested and I'm still getting the same behavior.

    I'm not quite sure, but it seems if I enter play mode only briefly, the cameras reset as they should.

    Here's an updated clip showing my setup and what happens when I enter play mode (25s in):

     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    That's really strange.
    Can you try, as an experiment, to simplify things a little? Disable the other brains and the other vcams, and rename things - give them unique names to make it completely unambiguous what is referring to what.
    Also can you ensure - for the test - that there is only a single vcam and a single brain in the entire scene?
     
  5. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Still getting the same thing.

     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Hmmm... thanks for that.
    I don't know what could be wrong. It all seems to be right, except that it's wrong.
    Can you export the test as a package and send it to me? I can take a look.
     
  7. reinfeldx

    reinfeldx

    Joined:
    Nov 23, 2013
    Posts:
    164
    Message sent.