You can make an object float by adding a dynamic locator to it. Dynamic locators follow the motion of the ocean along the Y-axis and they react to dynamic attributes such as buoyancy, gravity, and damping.
To make objects float
By default, locators are connected directly to the expression, enabling you to rename locators without breaking the expression.
If you want to move the position of the locator interactively, the locator cannot be connected directly to the expression. In this case, turn on Free Transform in the options window.