Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Cinemachine Collider not working, should the structures in Collide Against have Colliders?

Discussion in 'Cinemachine' started by Solidcomer, Sep 27, 2020.

  1. Solidcomer

    Solidcomer

    Joined:
    Sep 12, 2017
    Posts:
    95
    I have a freelook camera, and added the extension of Cinemachine Collider.
    I've set all my structures in the scene into CameraCollider layer, chosen this layer in "Collide Against" option under the Obstacle Detection of the extension, and used the Pull Camera Forward strategy.
    (I've also set Near Clip Plane to 0.01 under Lens)

    This doesn't work, and camera doesn't move forward when it hits a structure. I'm using Unity 2019.4 and Cinemachine 2.6.3.

    Should I add colliders to my structures?

    upload_2020-9-28_1-32-48.png

    upload_2020-9-28_1-33-56.png

    Please help!
    Thanks.
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Yes ;)
     
  3. Solidcomer

    Solidcomer

    Joined:
    Sep 12, 2017
    Posts:
    95
    thanks a lot for the reply, I added this to one of my structure, but still it doesn't work. is it because the material is missing?
    upload_2020-9-28_3-2-43.png
     
  4. Solidcomer

    Solidcomer

    Joined:
    Sep 12, 2017
    Posts:
    95
    OK I know what's happening, the collider I added was too small :p:p
    Thank you very much.
     
    gaborkb likes this.