How to make floating boat

Hi, May I request a method or approach to make an object (boat) float on top of a plane that makes sin waves.
Currently I achieved by manually adjusting boat sin function in sync with wave.
thanks.

liveLink: deploy3

You could calculate the average normal of the water plane triangles/quads within the boat footprint and align the boat up vector with it.

2 Likes

https://sbcode.net/threejs/gerstnerwater/

3 Likes

This is a very useful reference. Let me understand the code and try implementing for my case. I need few days to work on this approach. Thanks