Search Unity

Limit Cinemachine Player following to Game-Zone

Discussion in 'Cinemachine' started by omerhijazi2008, Jun 11, 2020.

  1. omerhijazi2008

    omerhijazi2008

    Joined:
    Jun 11, 2020
    Posts:
    2
    Hi,

    I wanted to limit my Cinemachine to follow the player wherever it goes but stop at specific boundaries so that the player is not shown the void outside the game area
    much like placing a box collider around the game area so the player does not go outside the game area

    Thanks in advance :)
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Hi,
    Try the Cinemachine Confiner. On your VirtualCamera, you'll find an option to Add Extension. Click on the dropdown and select Cinemachine Confiner. See the attached image.
     

    Attached Files: