How can I make a ship interact with the waves on water?

First, this is a very good question.
The problem of rigidbodies interacting with fluids is largely solved but extremely computationally expensive.
It’s also pretty complicated.

The tutorial you’re looking for is the Render Target Lookup.
Everything should still apply to UE4.9

That tutorial does an excellent job, but the best solution to this problem in a game I’ve seen was having a set of sphere colliders mimic the approximate positions of the waves.
By converting the waves into a heightmap and then creating a series of overlapping spheres (every sphere should overlap with its 4 neighbours by about 3/4 its radius), and have these overlapping spheres interact with the ship hull, which should be a very simple convex mesh, a surprisingly physically accurate model can be established.
I’m not sure what the properties for the sphere materials should be in UE4, but with some tweaking this allows you to achieve both a good “look” and a reasonably good estimate of how much the waves should be physically pushing an object in a direction, as the spheres will push objects around as they roll.

1 Like