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

Possible bug with VCam 3rd person follow and damping in Cinemachine 2.6.3

Discussion in 'Cinemachine' started by StephaneDNO, Apr 8, 2021.

  1. StephaneDNO

    StephaneDNO

    Joined:
    Jan 17, 2018
    Posts:
    5
    Hi everyone,

    Cinemachine 2.6.3 has a very strange behavior with 3rd person follow and damping, that was not present before.

    It looks like Cinemachine rotates the camera on its own axis and “forget” the look at. Like damp then rotate.

    I've scratched my head a long time to figure out what was wrong with my code but the behavior is easily reproducible with the Cinemachine’s AimingRig sample. Put a z damping (say 1.5) , move forward and tilt the camera up or down.

    Here's some screens from the AimingRig sample.
    With 2.6.2, everything is fine :
    Cinemachine_262.jpg
    With 2.6.3 the camera “loose” the target :
    Cinemachine_263.jpg
    Here is my settings for the camera in my own project. CameraTarget reference an empty GameObject in the player’s hierarchy.
    camera_settings.jpg

    In the changelog of 2.6.3 there is a bugfix :
    3rdPersonFollow damping was done in world space instead of camera space.
    Maybe it's related.

    Have a nice day.
    Thank you for your help.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    There was a fix for 3rdPersonFollow damping in CM 2.6.4. Please download it and see if your problem is still there.
     
  3. StephaneDNO

    StephaneDNO

    Joined:
    Jan 17, 2018
    Posts:
    5
    Thank you for the quick answer.

    I've just deleted the cinemachine package cache to be sure to re-download it. The problem is still here.

    But i messed up at the end of my 1st post with the versions numbers :
    2.6.3 everything is fine.
    2.6.4 strange behavior. like a mix between 1st and 3nd person.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    I suspect that the new behaviour is the correct one. Damping acts like a spring making the distance between camera and player stretch. That's what seems to be happening in the image you showed. What do you expect Z damping to do?
     
  5. StephaneDNO

    StephaneDNO

    Joined:
    Jan 17, 2018
    Posts:
    5
    Maybe I'am missing something.
    I quickly made 2 videos to show you the problem.
    Nothing change between the 2 videos except the CM's version.

    This is what i expect :


    and this is with CM 2.6.4 :
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Yes, the difference is where the "springs" are placed in the rig. The Z spring got moved - it's now at the player-end of the rig instead of at the camera-end. This more closely approximates what a 3rd person following the player would do, but I can see that it can be a little confusing with higher damping values.
     
  7. StephaneDNO

    StephaneDNO

    Joined:
    Jan 17, 2018
    Posts:
    5
    I've just check the camera in Ubisoft's The Division and you seem right about the spring.
    So my z damping value is just too high ?
    I have to tweek/damp the target position too ?

    I'm a little bit confused.
     
  8. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    So it's really about what is the intention of this camera. If truly a 3rdPerson follower is what you want, then it makes no sense to get really tall when you tilt the camera down, in order to keep the player in sight. On the other hand, with high Z damping you lose sight of the player, and the aiming function of the camera is compromised.

    We've discussed this over at CM headquarters, and we're coming to the conclusion that your expectations are closer to what most people want from this camera, so we're going to tweak the damping algorithm to be less of an emulation of a third person, but more useful. I think the result will be what you're looking for.

    You should see it in the next patch release.

    Thanks for bringing this up!
     
  9. StephaneDNO

    StephaneDNO

    Joined:
    Jan 17, 2018
    Posts:
    5
    Thanks a lot Gregoryl !