Search Unity

Object is visible when it should not be because it it behind another object

Discussion in 'Editor & General Support' started by Pitohui13, Jul 29, 2021.

  1. Pitohui13

    Pitohui13

    Joined:
    Dec 26, 2019
    Posts:
    14
    See attached video.The darker cube is shown in front of the lighter cube in some circumstances when it should be covered.Is this a bug or might i have activated some setting that causes this?
     
  2. Madgvox

    Madgvox

    Joined:
    Apr 13, 2014
    Posts:
    1,317
    Make sure your shader is set to be opaque, looks like depth fighting due to a transparent shader.
     
    Pitohui13 likes this.
  3. Pitohui13

    Pitohui13

    Joined:
    Dec 26, 2019
    Posts:
    14
    This solved it,thank you!Any way to prevent depth fighting with a transparent shader?