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

Camera shows my character

Discussion in 'Editor & General Support' started by redlife2020, Dec 28, 2020.

  1. redlife2020

    redlife2020

    Joined:
    Aug 18, 2020
    Posts:
    3
    I couldn't find a solution to this, my character and camera are stacking
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    What is your desired result? Don't show the player at all? Just set up the camera's culling mask to not include the layer your player is on.
     
    redlife2020 likes this.
  3. redlife2020

    redlife2020

    Joined:
    Aug 18, 2020
    Posts:
    3
    thanks to your answer I solved it
     
  4. payalzariya07

    payalzariya07

    Joined:
    Oct 5, 2018
    Posts:
    85
    This is completely normal behavior. It's called backface culling, and it's the most common graphics optimization used by video cards and the like.

    Every face has a 'normal' value, which defines the vector pointing directly out from that face. As well as being used in several shader calculations (lighting etc.), it is also used by the camera to determine whether the face in question is on the side of the object which should be visible. If not, (ie. the normal is facing away from the camera) it simply does not render the face.

    There are two solutions to this problem- the first is to find or modify a shader that doesn't remove backfaces. This is probably not the best of plans, since it will probably double the amount of rendering that needs to be done, for no real advantage.

    The second option, which I would recommend, is that you model all your meshes to have two sides- one set of faces for the outside shell, and another set of faces pointing the other way for the inside. Another thing- for UV mapping, you probably want a different texture on the inside. If you only have one set of faces, you'll have the same texture on both sides- which would look a little odd, for most buildings.