Search Unity

I am having a weird camera glitch and I don't know how to fix it (solved)

Discussion in '2D' started by minerandom, Aug 4, 2019.

  1. minerandom

    minerandom

    Joined:
    May 12, 2019
    Posts:
    6
    it started this morning randomly. It wasn't there the night before here is a picture of what I'm talking about:
     

    Attached Files:

  2. AAcat

    AAcat

    Joined:
    Apr 11, 2015
    Posts:
    19
    If you are talking about the shadow of the tree clipping, check the sort order and sorting layer, if they are on the same plain this can happen. If that's not the problem can you describe in more detail what we are seeing in the image because we can't tell what the problem is exactly?
     
  3. minerandom

    minerandom

    Joined:
    May 12, 2019
    Posts:
    6
    I didn’t notice the tree shadow thing. I am talking about the giant black rectangle under the gismos tab to the right. Idk why that is there it shouldn’t be. That part is out of the camera box.
     
  4. Skelly1983

    Skelly1983

    Joined:
    Mar 9, 2017
    Posts:
    17
    Without seeing your Camera component can not tell how you have it setup, are you using Pixel Perfect Camera package? if so have you ticked the crop frame options?
     
  5. minerandom

    minerandom

    Joined:
    May 12, 2019
    Posts:
    6
    Do you want a picture of the settings in the inspector for the camera or the scene view or both?
     
  6. Skelly1983

    Skelly1983

    Joined:
    Mar 9, 2017
    Posts:
    17
    In the inspector so we can see how you have set this up, including pixel perfect camera component if you are using it.
     
  7. minerandom

    minerandom

    Joined:
    May 12, 2019
    Posts:
    6
    here is the inspector
     

    Attached Files:

    • Cam.PNG
      Cam.PNG
      File size:
      76.3 KB
      Views:
      572
  8. AAcat

    AAcat

    Joined:
    Apr 11, 2015
    Posts:
    19
    I see, mess around with the Viewport Rect. The width is less then 1, so it wont render that side of the screen, if you set W to a higher number (usually just set it to 1 by default), that black rectangle should either be smaller or gone.
     
    Skelly1983 likes this.
  9. minerandom

    minerandom

    Joined:
    May 12, 2019
    Posts:
    6
    Thanks, AAcat for solving my issue it worked perfectly I didn't even think about the Viewport Rect
     
  10. Skelly1983

    Skelly1983

    Joined:
    Mar 9, 2017
    Posts:
    17