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

Cinemachine collider not working properly

Discussion in 'Cinemachine' started by DanielP_, Aug 20, 2019.

  1. DanielP_

    DanielP_

    Joined:
    Jun 4, 2019
    Posts:
    16
    Hi!

    I am using cinemachine collider and I think I am missing something here. I am working with an orbital transposer virtual camera with this config:

    Captura.PNG

    and a cinemachine collider extension with this settings:

    Captura2.PNG

    (The collide against layers are setted with the same layers the obstacles have.)

    When I run with the player against one obstacle, the camera detects the obstacle but it runs through that obstacle instead of avoid it. You can see it better in the video:

    https://drive.google.com/open?id=1c_QaW0Te2AFoCm1pUbvWoQbBKQPSLxNz

    Is there any way to avoid this? I tried to change the settings in the collider but didn't work. The desired behaviour for me would be, after detect an obstacle, rotate to left or right in the orbital transposer component until the player will be visible again (any part of the player) and I would like to keep the cinemachine properties (basic collisions but not any of the strategies proposed).

    Thank you ;)
     
    Last edited: Aug 21, 2019
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Out of the box, the standard Collider will sometimes move the camera through obstacles. There is no way to get it to control the orbital transposer directly. To do that, you'll have to implement your own custom extension.