Search Unity

Question Why my assets don't appear in camera?

Discussion in '2D' started by Rafael_Ferraz, Mar 10, 2023.

  1. Rafael_Ferraz

    Rafael_Ferraz

    Joined:
    Mar 10, 2023
    Posts:
    7
    So, initially, my game objects where all set on the 2D game with the transform.position = (0, 0, 0) but because of that none of my objects where appearing on camera. I tried setting the Z position on the player and the dynamic background thinking it would help me, but that only caused further confusion: the player would disappear and the overlay on my background would display black bars.

    Here is a video showing what is happening:


    I tried changing the layer as well, but I had no success.
     
  2. venediklee

    venediklee

    Joined:
    Jul 24, 2017
    Posts:
    221
    They are outside the clipping planes of your camera, try tinkering with camera Z position or changing clipping planes
     
  3. Rafael_Ferraz

    Rafael_Ferraz

    Joined:
    Mar 10, 2023
    Posts:
    7
    Sadly, it didn't worked. Usually messing with the "Z" on transform does help but it mess placement of the assets and the overlay on my dynamic background. Anything else I can do?
     
  4. venediklee

    venediklee

    Joined:
    Jul 24, 2017
    Posts:
    221
    The placement of the assets "get broken" because you are in perspective mode; are you sure reducing the camera near clipping plane to 0 doesn't work? If not, you have to move the camera just a tiny bit more back
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,455
    FYI: I've removed the "2d physics" tag because your post doesn't relate to that.
     
  6. Rafael_Ferraz

    Rafael_Ferraz

    Joined:
    Mar 10, 2023
    Posts:
    7
    Oh... Sorry for that, I am new here. Getting the hang of tags.
     
    MelvMay likes this.
  7. Rafael_Ferraz

    Rafael_Ferraz

    Joined:
    Mar 10, 2023
    Posts:
    7
    Sure, moving the "z" axis helped but why do I still see the black bars? Is that a problem?
     
  8. Rafael_Ferraz

    Rafael_Ferraz

    Joined:
    Mar 10, 2023
    Posts:
    7
    Update: turns out messing with the clipping planes solves the black bars on my display, thanks friend!
     
    venediklee likes this.