Search Unity

[2018.2] Strange behaviour Cinemachine Collider + Free Look

Discussion in 'Cinemachine' started by Mars91, Sep 6, 2018.

  1. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    391
    Hi,
    I'm using Cinemachine to follow the player and I'm experiencing some strange behaviour on camera collision.
    Here's a video.


    Here's a pic of my FreeLook/Collider configuration
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,608
    What's happening is that the camera, which is a big ball of radius 0.3, is colliding with the corners of your columns. There are a few things you can do to mitigate this in the Collider settings:
    • Reduce the camera radius to be as small as you can get away with
    • Put in a little smoothing time, some fraction of a second. That stops the camera from popping around so much
    • Add some Damping and Damping When Occluded (the first should be set a little smaller than the second)
    If that fails to give you what you want, then you can add some invisible cylindrical colliders (on a layer that only the vcam can collide with) around your columns, to smooth out your environment.
     
  3. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    391
    Looks like I made it here's my settings

    Camera Radius: 0.05
    Smoothing Time: 0.1
    Damping: 0.25
    Damping When Occluded: 0.35
     
    Gregoryl likes this.