About a week go I published a tutorial on how to make a boat float in Unity. It looked good and worked realistically, but it wasn't doing much. Today I updated the tutorial with waves and how to make something move because of waves. The answer to that question is called wave drifting. I used a very simplified version which looks like this:
F = 0.5 * rho * g * S * S * n
rho - density of water or whatever medium you have
g - gravity
S - surface area of triangle
n - normal to the surface
And then you just add this force to a triangle that's below the water surface. This is how it looks like:
But that's not it! Next week I will add resistance forces, and then the week after that I will add propulsion, so the boat can actually move around!
Looks interesting? You can test it here.