Math and physics › Physics of motion
Buoyancy: objects on waves
Know first: Forces: gravity, friction and drag, Springs and damping: a smooth camera and soft motion
Why water pushes things up, and why some things float while others sink. Then how a game does it: a few sample points on the hull, each with a spring and damping. The page then covers where wave height comes from and why the physics and the picture of the water must compute the same wave. It also explains what keeps a boat from capsizing and why it moves bow first.
Why this matters
In a game, water is usually only a picture: a surface that a material moves in waves. The physics engine knows nothing about it. For a boat to rock or a barrel to float back up, something has to push the object upward, and games compute that force in a simplified way, at a few points. Once you know where the force comes from and how it is simplified, you can tune any buoyancy setup. You can also tell why a boat jumps, hovers above the water or flips over.