Search Unity

Cameras Blending Will Snap When Using State Driven and Mixing Cameras Together

Discussion in 'Cinemachine' started by AhSai, Mar 18, 2019.

  1. AhSai

    AhSai

    Joined:
    Jun 25, 2017
    Posts:
    129
    I have a State Driven Camera blending between two Mixing Cameras, and each of these Mixing Cameras has two Virtual Cameras. The blending will snap by a frame when I switch back and forth with the animator state quickly (before current blending is completed).
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Can you put together a small scene to demo this and post it here?
     
  3. AhSai

    AhSai

    Joined:
    Jun 25, 2017
    Posts:
    129
    I reproduced this with a simple scene set up as follow:
    upload_2019-3-18_21-10-40.png

    where all cameras do not need a follow or look at target, all it needs is high enough noise in one of the cameras and make sure it has enough weight to have influence. I simply added two buttons that do Animator.SetTrigger to trigger the StateDrivenCamera back and forth. If you switch state before the current blending is finished it will produce a snap.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Can you please export that scene as a Unity Package and post it here, to eliminate any uncertainty. Also please mention the Unity version and CM version. Thanks.
     
  5. AhSai

    AhSai

    Joined:
    Jun 25, 2017
    Posts:
    129
    I am using Unity 2018.2.19f1 and Cinemachine 2.2.8
     

    Attached Files:

  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Thanks for preparing that, it's a big help.
    It's a bug!
    We'll include a fix in the next CM release.
    Many thanks for finding it and posting here.

    In the meantime, you can use the following workaround:
    On the vcam with the noise, set the Standby Update mode to Always:

    upload_2019-3-19_9-38-26.png