Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug When switching virtual cameras repeatedly, the blending becomes fast

Discussion in 'Cinemachine' started by juwey, Jul 18, 2023.

  1. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    f I switch the virtual camera from A to B and quickly switch to A before switching to B, it will cause the blend to become very fast and inconsistent with the configured blend time
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    Which version of CM are you using?
     
  3. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    I used version 2.86
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
  5. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    thank you.If I use the 2.9.7.The bug is fixed.Another problem is that when I use target damping on my freelook camera and the follow gameobject hits a dead zone and keeps moving, the camera jitter.how can i fix the problem
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    Can you show a video of the problem?
     
  7. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    of course. please look this
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    Does the problem happen in a build, or only in the editor?
     
  9. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    This problem exists both on the PC and in the editor.
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    I don't quite understand your answer. I tried to reproduce the issue that you showed in the video, using the Cinemachine sample assets. I was able to repro the stutter when I played the scene in the editor, but when I made a build of the scene and tried that, it was perfectly smooth. Did you try that?

    upload_2023-8-7_7-35-26.png
     
  11. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    thankyou very much. i try it in my demo is smooth.Now i will try it in my project.
     
    Gregoryl likes this.
  12. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    Can you tell me why smooth in a build? I try it in my project and get a smooth result too.
     
  13. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,207
    Because the Unity editor has lots of overhead that can generate uneven frame rates. Cinemachine damping is sensitive to uneven frame rates, and you might see jitter when that happens. It's not impossible to see it in a build, but it's less likely.
     
  14. juwey

    juwey

    Joined:
    Jul 18, 2023
    Posts:
    8
    thank you.i got it