Search Unity

Bug CinemachineCollider works incorrectly when There are multiple colliders in the scene.

Discussion in 'Cinemachine' started by truncoat, Oct 24, 2022.

  1. truncoat

    truncoat

    Joined:
    Jun 15, 2018
    Posts:
    3
    There were several obstacles in a conner of my game scene,when my main virtual camera hits one of the obstacle game object ,it will Deviating from its own entity,at this time, all collusion will be happend on the virtual camera entity at it's position rather than the actual position of virtual camera,Is this right?
    It's looks like cinemachine virtual camera collider can only process one collusion of one obstacle at a time?
     
    Last edited: Oct 24, 2022
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    I don't really understand this question. Can you elaborate? A picture could be helpful here.
    There is logic to handle multiple simultaneous collisions, but if the shape is too complicated it might not always give the results you want. You can often fix this by simplifying the colliders. Can you show an image of the problem?
     
  3. truncoat

    truncoat

    Joined:
    Jun 15, 2018
    Posts:
    3

    Thanks for your reply,and sorry for my poor grammer.
    You can see two green wire square in scene,they are obstacles.The one on right push virtual camera out of It's border,and leave the entity of virtual camera behand(the cinemachine icon).Everything works correct at this time,but when I move the camera to the border of left obstacle,the virtual camera entity(the cinemachine icon) hits the border but in fact the virtual camera didn't,it has been pushed out already.This is a simplified example,it will be more complex in real project.
    I'm think the cinemachine collider should work at the actual position ,not the entity postion(the cinemachine icon).
     
    Last edited: Oct 25, 2022
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    Thanks for the details. This is working correctly. The CM camera is pushed out of all overlapping colliders. That is what it is designed to do.