Search Unity

FreeLook - Collider: Avoiding obstacles problem

Discussion in 'Cinemachine' started by Mars91, Feb 5, 2019.

  1. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    Working on a third person game I need my camera to have a collider and the Cinemachine Collider is just perfect but I have a problem:

    I don't want the camera to freak out when something is occluding the player, everything is ok if I toggle Avoid Obstacles but if I do so the camera is not colliding with things anymore.

    How can I solve that?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,725
    You can tell the collider that certain layers are transparent, i.e. don't worry about them occluding the target.

    upload_2019-2-8_15-24-59.png
     
  3. Mars91

    Mars91

    Joined:
    Mar 6, 2012
    Posts:
    572
    Just for future reference I solved that setting distance limit of 1.