Search Unity

Water going throught mesh

Discussion in 'General Graphics' started by Thilun, Jun 6, 2015.

  1. Thilun

    Thilun

    Joined:
    Jan 18, 2015
    Posts:
    13
    Hello eveyrone !

    I'm working on a boat game and I'm facing a big problem, I tryed to find a way to fix it by my own, but I'm stuck front of the fact that I can't alone, I'm sending you a picture that will probably show you what's the problem !

    If you got any advice, I'll listen it ! Thanks a lot, and have a nice week end :)
     

    Attached Files:

  2. abhuva

    abhuva

    Joined:
    Dec 23, 2011
    Posts:
    76
    This is easy to solve, take a look here:
    http://wiki.unity3d.com/index.php?title=DepthMask

    Basically you will create an extra mesh that covers the top of the boat, assign the DepthMask Shader to it and use the SetRenderQueue Script on this Mesh (i set mine to 1800 wich works pretty well)
    Then you use the SetRenderQueue Script on the Boat Mesh aswell and set it to a lower value (mine is at 1500) - thats basically all you have to do.
     
    Last edited: Jun 6, 2015
    theANMATOR2b likes this.
  3. Thilun

    Thilun

    Joined:
    Jan 18, 2015
    Posts:
    13
    You saved my life thank you so much ! :D
     
  4. Thilun

    Thilun

    Joined:
    Jan 18, 2015
    Posts:
    13
    I'm facing another problem, I'm was trying to walk inside my boat with my mask on the top of it, and hop, my character legs disapeared xD

    I don't really know how to solve it, I have tryed to apply a SetRenderingQueue on the mesh of the character but nothing happens, if you have any idea of how I can fix it :)
     

    Attached Files:

    • xD.png
      xD.png
      File size:
      402.8 KB
      Views:
      927