Just Archimedes' law: Requires a collider and rigidbody components. P.S. I've updated the script: 1) The old one didn't take into account object rotation and consequently produced wrong results sometimes. 2) The new one draws nice gizmos P.P.S. Version 2.1 1. I decided to not calculate density from volume, because volume "calculation" itself is quite inaccurate. It's easer to specify the correct density manually. 2. Now it works with concave shapes too. Thanks to Antitheory for the idea. P.P.P.S. License: WTFPL version 2.