Search Unity

Jittery camera

Discussion in 'Cinemachine' started by TheHalfBlind, Jan 21, 2020.

  1. TheHalfBlind

    TheHalfBlind

    Joined:
    Sep 26, 2018
    Posts:
    9


    I have seen this issue being raised again but with no solution. As you can see in the video the camera jitters.
    Also after some googling, I think it's useful to include that I am using Rootmotion's FinalIK and PuppetMaster. Maybe the execution order is at fault that's why included it or maybe it is not. Thus far I have tried changing the update method and execution order. However, for the execution order since I couldn't change cinemachine value I lowered the rest. I have no idea if this is the same though

    Any proposals for possible solutions or for better understanding the issue and how to fix it are welcomed. Thank you in advance.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Hmmm...

    I find it a little strange that you have both a CM Brain and and Animator on the Camera. What's that for?

    General principles: the Brain drives the Camera by looking at the currently active CM Virtual Camera. The Brain expects to have full control of the Camera, and not to be fighting with some other control system.

    If you set the Brain to SmartUpdate, and then while in Play mode look at the Virtual Camera inspector, how does it report its update state?

    upload_2020-1-21_10-43-46.png
     
  3. TheHalfBlind

    TheHalfBlind

    Joined:
    Sep 26, 2018
    Posts:
    9
    The animator is attached in order to change the offset of the camera smoothly. Kind of like changing shoulder in games.
    However, I did find a solution for now. As far as I can say changing the hierarchy that pupetmaster produces which can be found below and then attaching the PlayerWithCharacterController to the cinemachinefreelook to follow and to look at seems to fix the issue which I don't really know what it was, to begin with.

    At any rate, thanks for your help if I find out more I will be sure to post.
     

    Attached Files:

    Last edited: Jan 21, 2020
    Gregoryl likes this.
  4. a_engel123

    a_engel123

    Joined:
    Dec 25, 2020
    Posts:
    4
    Hello,

    I am in a similar situation in that I am also using Rootmotion's PuppetMaster (ragdoll controller). Under Smart update the listed update method is late update. I can not see the video, but the camera jitters the most when the character (3rd person follow) moves sideways. The character is being moved by a character controller script from Unity's starter assets.

    Have there been any solutions found besides changing the hierarchy?

    Thanks in advance!
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    @a_engel123 If the character is being moved in both Update and FixedUpdate, then you might get jitter. A solution in that case would be do do all movement (translation and rotation of target) in LateUpdate. Look at the code and see if you can find instances of the target being moved in FixedUpdate, and try changing it to Update.
     
    a_engel123 likes this.