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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Cinemachine: Camera jitter after loading scene.

Discussion in 'Cinemachine' started by George_C, Jan 11, 2023.

  1. George_C

    George_C

    Joined:
    Nov 10, 2017
    Posts:
    6
    Hello

    For some reason when loading a scene using the scene manager the Cinemachine Virtual Camera will jitter as it follows the player. This doesn't happen when I play the scene from the editor, only when I load into the scene from another scene with the scene manager.

    I already know it isn't due to an interpellation issue since I've already set the player's rigid body to interplate. Both my CinimachineBrain components "Update Method" and "Blend Update Method" are set to late update. I'm also only using Cinimachine's built-in components for camera movement with no custom scripts. I've also tried both "LoadSceneAsync" and non "Async" in desperation.

    I've tried many things now and nothing seems to work, the only hint I have is that something odd may be happening to delta time when the scene loads but I have nothing to back that up, just something I read in another forum post while troubleshooting.

    I'm at a loss for what to do so hoping someone here will be able to help.

    Thanks in advance.
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    It is possible that the movement of the player is jittery. Could it be that the way it is moved is frame-rate dependent?

    If you attach the Camera directly (with CinemachineBrain disabled), do you see jitter?
     
  3. George_C

    George_C

    Joined:
    Nov 10, 2017
    Posts:
    6
    Hi thanks for the response, I just tested this and no it doesn't appear to be the player's movement, the player moved smoothly after turning off the CinemachineBrain both when I attached the camera directly and just pointed at the player free floating.

    I should also add that the jitter only seems to be present for movement not rotating the camera around the player.
     
    Last edited: Jan 12, 2023
    gaborkb likes this.
  4. George_C

    George_C

    Joined:
    Nov 10, 2017
    Posts:
    6
  5. George_C

    George_C

    Joined:
    Nov 10, 2017
    Posts:
    6
    I don't mean to spam but I've got an update

    Upping the dampening on the camera seems to solve the issue though now I have the camera falling too far behind the player due to the extra dampening.
     
  6. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Could you show your character controller script? To see how your player is moved.
     
    Gregoryl likes this.