Give a body a density and Bounded Buoyancy does the rest: it floats at the right depth, rides the waves, sails, floods, sinks – with no scripts and no tuning.
The problem. Most buoyancy code applies the buoyant force to the body’s own mass. For anything much lighter than water, that has no limit: an air bubble released under water accelerates at 815 g in its first frame and jumps 2 m in a single physics step. Real bubbles start at about 2 g, because the water around them has to move too (the “added mass” of hydrodynamics). That’s why light things rocket out of the water, jitter on the surface, or need damping hacks to calm them down. In the clip, the usual method is on the left and Bounded Buoyancy on the right.
The fix. Bounded Buoyancy doesn’t use Godot’s gravity plus a buoyancy force. It switches gravity off on each floating body and drives it, every physics step, with one force: the density-state drive from the ValerieX (VXXX) paper, the difference between the body’s density and the water’s, with weight and buoyancy as one push instead of two fighting each other. The water’s added mass goes into the body’s inertia, so nothing falls faster than g and light things rise no faster than about 2 g. No damping hacks, no tuning: give it a density and it behaves.
What you can build with it:
- Anything floats properly: box, sphere, cylinder, capsule, convex or a mesh finds its true waterline, tilts and rights itself, and a low centre of mass works as ballast
- Things settle like real ones: a bobbing body sends out ripples and comes to rest in a few bobs, with no damping added
- Water nodes with waves, currents and rivers, placed anywhere – or float on the ocean shader you already use
- Real water: its density follows temperature, salt and depth, with a thermocline and oil, brine or mud layers – so things float differently in a cold sea, a warm lake or the Dead Sea
- New in 2.7: floating things sway with the waves and drift the way they run, like real flotsam
- Boats with keels, rudders, self-trimming sails and propellers – a dinghy that sails upwind on its own
- Ships that flood through holes, list and sink, or stay afloat with compartments and can be pumped dry
- Cannons whose round shot skips across calm water and holes the planking – sink a ship in a broadside
- A submarine that floods its tanks and settles on a layer of saltier water
- Fishing: lines that stretch and snap, floats that dip on a bite, fish that run, tire and throw the hook
- Wind with gusts, helium and hot-air balloons in air that thins with height
- Splashes and ripples, with water_entered / water_exited signals for your sounds
- A full 2D version for RigidBody2D
- An optional native kernel (Windows and Linux): 300 bodies on waves in about 3 ms a frame
- Works with Godot Physics and Jolt, Godot 4.4 to 4.7, backed by 290+ automated tests checked against real measurements
Getting started: enable the plugin, add a BoundedBuoyancyBody (it’s a RigidBody3D) with a collision shape, set its Density (water is 1000), and add a BoundedBuoyancyWater node. That’s it. To see all 16 demo scenes – including a full pirate battle you can sail – open addons/bounded_buoyancy/demo/demo.tscn and press F6.
The guide compares it head to head with the usual method and other approaches, on the same tests.
It’s free and MIT licensed, on the Godot Asset Store now:
And on GitHub, with a Unity version in the same repo:
The physics is published: the companion paper and the ValerieX (VXXX) density-state drive paper are on Zenodo (search “Bounded Buoyancy Parkyn”, DOI 10.5281/zenodo.23304509).
If anything floats wrong in your game, tell me and I’ll fix it. And if it saves you time, a recommendation on the store really helps other developers find it.