Let crates and logs float at the right depth and bob on waves without sinking or flying
A floating crate that sits on top of the water like a table, sinks like a stone or jumps out of the lake on the first splash is a common bug in sandbox worlds. Here is how the upward push grows as it sinks, so each thing finds its own level.
Why this works
Water pushes up in proportion to how much of the body is wet. Too low means more push, too high means less, so the body is always nudged back to one depth, like a spring. A little braking in the water then stops the endless bobbing.
When not to use it
Don't use it for big ships, rafts people stand on, or anything that must tilt and roll: it only knows up and down. There, work out the lift at several points of the hull, or just glide the object along the wave without force.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 35 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Let crates and logs float at the right depth and bob on waves without sinking or flying" (read_entry floating-crate-settles-at-its-waterline) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP