- Home /
Boat in standard assets water
I have a boat model that I want to place in the standard water asset from unity, how can I make it so the water wont go through the boat?
so you can actually see inside the boat with the boat in the water but the water wont go through it and basically fill it up.
Answer by Mmmpies · Mar 11, 2015 at 11:46 AM
Not got access to Unity but I know there's a depth mask on the unify community wiki that delays drawing so effectively draws a boat over the water. On my phone and the link keeps screwing up but Google unity DepthMask and it should be first in the results.
Still on 4.6! no problems, hopefully! I'll have a look thank you very much!
I totally forgot this was still here, I got it to work basically straight away thanks a lot for your answers!
Glad it helped @Jan_Julius
Well now I actually have a keyboard rather than a phone to type on I can confirm it works in 5 although the default model that comes with the package on that page fails to load in 5.
$$anonymous$$y modelling skills are virtually zero so to recreate I got a boat from the asset store. That was fine but in order for this to work you need a copy of the boat's mesh that isn't hollowed out so ins$$anonymous$$d of a rowing boat think more of a canoe without the hole. As I said my modelling skills are really bad so I just put 2 capsules on as children of the boat squished down their Y and extended their X and Z so one fitted (almost) the bow and stern and other filled in the wider port/starboard.
threw on a random material and added the shader from that page (thanks @alucardj for providing the link)
It's not exact but it proved the point with Unity 5.