Search Unity

Mix 2D and 3D in the same scene

Discussion in 'General Graphics' started by DoYouRockBaby, Jul 16, 2018.

  1. DoYouRockBaby

    DoYouRockBaby

    Joined:
    May 21, 2018
    Posts:
    9
    Hello

    It's been a long time that i try to nicely mix my 3d characters into my 2d environment.

    The problem is that where the 2d sprites use Order In Layer, my meshes use Z-buffer to determine what should be displayed and what shouldn't. So the part of my characters that have a negative z value are not rendered

    Here is a screen to hilight what i'm facing.

    Capture.PNG

    I tried a lot of things but i didn't managed to solve this problem.

    Thanks by advance.
     
  2. MSplitz-PsychoK

    MSplitz-PsychoK

    Joined:
    May 16, 2015
    Posts:
    1,278
    There's probably a few ways you can solve this. I recommend splitting your camera into one that sees 2D and one that sees 3D. Have the 3D camera render second and use the "Depth Only" clear flag so that it ignored depth from the 2D camera.