Search Unity

2 planes existing/overlapping

Discussion in 'World Building' started by SamohtVII, Aug 22, 2018.

  1. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    370
    I have a terrain and a flat object that I want to seamlessly transition between. When I put them at exact same Y position with some overlap they create a very erratic and jagged pattern as if they are both fighting to be on top.
    How Can i prioritise one over the other and make them work together?
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    What you're describing is called Z-fighting. The simplest solution is to move your plane slightly closer to the camera. If you can't do that, you might need to cut a hole in your terrain where the plane goes, using a stencil buffer or some such trick.
     
  3. SamohtVII

    SamohtVII

    Joined:
    Jun 30, 2014
    Posts:
    370
    Thanks, I'm hearing a lot of moving one item closer but I need the flat plan for my car and I don't want a bump. I'll investigate other options if that doesn't suit.
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Well, remember that the colliders don't have to be exactly the same as the visual mesh. That can help you avoid a bump in cases like this.
     
    Kurt-Dekker likes this.