Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

EaseInOut Blend will not work if the virtual camera was not updated one frame

Discussion in 'Cinemachine' started by MathieuGirard, Nov 17, 2018.

  1. MathieuGirard

    MathieuGirard

    Joined:
    Nov 19, 2017
    Posts:
    3
    Hi all,

    I am using Cinemachine in Unity 2018.2 My camera setup uses a mix of gameplay cameras and cutscene cameras. I use a custom blend to EaseInOut from the last custscene camera back to the gameplay camera.

    This works well in all situations, except when I am doing this at the start of the level. If my gameplay camera has never been updated, and that I start directly to the cutscene camera, then the EaseInOut will not work when returning to gameplay, and Cinemachine will snap directly to the gameplay camera, without blending.

    I have solved this by coroutining the launch of the cutscene, to wait one frame. The gameplay camera has time to update one frame while the screen is faded to black, then the cutscene is played, then the EaseInOut blend is played normally to the gameplay camera.

    This fix feels like a hack, and I was wondering if there is not a bug to fix here.

    Thanks!
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Indeed it does feel like a hack which shouldn't be necessary. I have never heard of this issue before. Would you be willing to zip up a project that illustrates this and send it to me so I can repro?
    Thanks