Row, Row, Row Your Cube!

When it comes to game development, the precursor of a sailboat is a sailcube! For buoyancy, I place a series of ‘test buoys’ around an object. Each frame the object checks if those points are above or below water. If significantly above, it applies gravity, and if significantly below, it applies upwards buoyancy. If somewhat above or somewhat below, it applies a smaller force. The result is an object that bobs and tilts with the water. Simple buoyancy When I implement the full ships, I will need to optimize each for the right balance of weight and ‘floatiness’. This ultimately depends on the shape, mass, test buoy positions, and dampening. I currently have an issue where the buoys do not account for horizontal displacement of the waves when determining if they are above or below water on steep waves, resulting in a momentarily floating ship or a ship that takes a little too long to rise with a wave. I will test how significant ...