Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Question Unity Cinemachine window size more than scene size

Discussion in 'Cinemachine' started by Bhattacharya, Oct 28, 2020.

  1. Bhattacharya

    Bhattacharya

    Joined:
    Jul 5, 2015
    Posts:
    2
    I'm having a 2d game which is having a player and two monsters to kill.

    I have setup cinemachine which is working just fine but the camera window size is more than than the actual scene size.



    To prevent that from doing so I had to create a empty target object at the top of the scene and the bottom of the scene





    Is there anything in Cinemachine which sets the screen size to look in the background as i have set in the CM vcam settings?



    the executable file is here - https://mega.nz/file/9wg0yYaa#4zoAANaVeCAkIDiOJX7Dcyk6Wh0rtsdMRZJbNcY8MWY

    the project file - https://mega.nz/file/0kgEmCoY#ewvGp8Lr02jmQ4_7ol6m-yUfDQvB5ZbM8r56qvhUsW0
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,234
    You shouldn't have to make those extra targets.

    If you set up your camera ortho size to be not larger than the scene size, position the camera vertically in the center, and set the Framing Transposer's Vertical Dead Zone to max, and set the Group Framing Mode to None, you should be ok:

    upload_2020-10-29_15-23-40.png
     
  3. Bhattacharya

    Bhattacharya

    Joined:
    Jul 5, 2015
    Posts:
    2
    thanks for replying, looks like there's someone out there atleast to view the problems.
    Well putting the group framing mode to none solves the problem but raises another problem that the camera does not follow the players and the enemies so it answers my question probably but does not solve the problem. If the camera has to be made fixed then probably this is the solution.
    Thanks anyways cheers.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,234
    It will still follow the player horizontally. Do you want it to be smaller than the scene size and also follow the player vertically? This is possible if you want it.