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

Bug Cinemachine Collider damping issue

Discussion in 'Cinemachine' started by mons00n, Dec 2, 2022.

  1. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    I'm encountering an issue with the CinemachineCollider damping settings that results in some odd behavior moving the camera while it is colliding with an object.

    In the following video you will see that the rig properly zooms in to account for collision. As I move the camera horizontally you'll notice what seems like the CinemachineCollider attempting to zoom out when it is still colliding with the object. If both Damping and DampingWhenOccluded are set to zero then the horizontal movement while colliding is much smoother.

    Is this an issue or something expected? My users are encountering this jerky movement frequently in tight spaces; I have added an option for them to disable the smoothing entirely but an instant transition isn't the greatest user experience. I am currently running a slightly modified Cinemachine 2.8.6 (modified to correct an issue I identified in this post).
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Sorry for the slow response.
    I'm unable to reproduce this issue in my test scene.
    Could it have something to do with some custom script, such as the FreeLookZoom?
    Could you send me a repro project?
     
  3. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    No worries on the delayed response! While I wouldn't entirely rule it out, FreeLookZoom just changes the orbit radius based on mouse wheel movement. But yea let me see if I can get you a trimmed down repro project (I'll shoot you a PM).
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Upgrading CM to 2.9.4 makes the problem disappear.
     
  5. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Thanks for checking on this! Is CM 2.9.x available on Unity 2021? For whatever reason 2.8.9 is the latest version showing for me in the package manager.
     
  6. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Yes, you can add it manually by editing the manifest. For some reason Unity has started hiding compatible package versions. I'm campaigning to have this decision reversed in future versions.
     
    mons00n likes this.
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    This way also works:

    upload_2022-12-13_11-18-5.png
     
  8. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Just verified that this is fixed in 2.9.4. I really appreciate you taking the time to look into this. I honestly thought 2.8.9 was the latest available version as that's what my package manager was telling me. Feel free to cite this post in your campaign to have that decision reversed.
     
    Gregoryl likes this.