Search Unity

Limiting the camera movement

Discussion in 'Cinemachine' started by Gamrek, Jul 24, 2017.

  1. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hi

    I want to know how to limiting the camera movement. I have a target and the vcam will follow the target with following settings

    "World Up"
    X: 0, Y; 10, Z:-10

    I wonder if there is a setting/script I need to make if I want to limiting the camera movement so it will stop once it reaches to certain places and only rotate the camera to aim at the target? Please look at my image for reference.

    Thanks

    Artboard 1.jpg
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    At preesent there in no setting in Cinemachine that will produce precisely the behaviour you describe. At best, the CinemachineCollider can be used to resolve collisions, but its behaviour is to move the camera towards the LookAt target until there are no more intervening obstacles.
     
  3. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Thank you very much for your answer.

    Derek
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    @Gamrek FYI the upcoming CM 2.1 has a Collider that behaves in the way you describe. In testing now, on the Asset store soon. Stay tuned.
     
    Last edited: Aug 14, 2017