Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Cinemachine Collider causes unwanted rotation

Discussion in 'Cinemachine' started by guillaumepauli, Apr 3, 2023.

  1. guillaumepauli

    guillaumepauli

    Joined:
    Jan 3, 2017
    Posts:
    6
    Hello there,

    I'm making a top down game with a transposer body and a composer aim.

    upload_2023-4-3_14-28-23.png

    I added a cinemachine collider and it adds some strange Z rotation to my camera. (when iremove it it does not rotates anymore)

    upload_2023-4-3_14-29-39.png

    here is a screenshot of my camera view upload_2023-4-3_14-30-10.png
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,564
    Question: how do you want the camera to behave when the player moves somewhere that is occluded from the camera's position?
     
  3. guillaumepauli

    guillaumepauli

    Joined:
    Jan 3, 2017
    Posts:
    6
    Hi there :)

    I would like the camera to stay where it is and look at the player!
    Thanks for your answer already
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,564
    So, if I understand correctly, when the player moves behind an obstruction you want the camera to continue looking towards the player, but the player will be hidden from view. If that's the case, just remove the CinemachineCollider.