Click the mouse to spawn random sized objects:bouyancy
There are two instance variables for each object
Which is like the base bouyancy rating. The higher the value the more it'll float, and if you set it low enough it will sink.
and "bouyMod" which goes from 0 to 1 depending on how submerged the object is.. 0.1 being only a tiny bit in and 1 being full submerged.
then the actual Y force is -(sprite.Bouy*sprite.bouymod*sprite.physics.mass)
Another thing you could add is a way to increase the linear damping when in the water, and to reset it back to normal when it comes out of the water.
..also maybe a crash variable.. that reduces the objects speed when it collides with the water.