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. Dismiss Notice

Question Sprites clipping at the edge of the camera (2D)

Discussion in '2D' started by __Arber__, Aug 8, 2020.

  1. __Arber__

    __Arber__

    Joined:
    Oct 20, 2012
    Posts:
    5
    So,
    after googling my problem for hours and finding only a single other question with the problem (but no solution), I have come to the conclusion that I must post here.

    My problem is actually very simply, but I can't seem to find anything to fix it. I'm using URP with Post Processing.

    The shadow is my own shader and is being a child of the original object (here: cactus)

    Here is a gif of my problem:
    clipping.gif
    And my camera settings:
    Camera1.png Camera2.png

    I just need the camera to render all objects in the view, but it seems like that the camera clips them too early
     
  2. adehm

    adehm

    Joined:
    May 3, 2017
    Posts:
    369
    Increase the object's bounds so that that it wont be culled; mesh.bounds = new bounds().
     
  3. __Arber__

    __Arber__

    Joined:
    Oct 20, 2012
    Posts:
    5
    I'm working with spriteRenderers and not with a mesh. Seems like spriteRenderer is read-only, meaning I can't change bounds.
     
  4. PuppyPolice

    PuppyPolice

    Joined:
    Oct 27, 2017
    Posts:
    116