![Wink ;)](./images/smilies/icon_wink.gif)
On PC i believe that Physx can do fluid surfaces which i would assume would take care of floatation stuff but on PS3 (where i'm working) it's not implemented yet (they're still working on how to efficiently implement it i believe).
So anyway, i've come up with an idea for this and i just wanted to put it out there to see if anyone had any better ideas or any reasons why this isn't such a good idea. I do already have it up and running and it seems like it will do the trick and doesn't cost too much in performance but it still needs some parameters tweaking to get it realistic.
Ok, so here's my idea. Imagine i've got a box representing an object i want to float on the water and the water is represented by a flat plane. Before now i just had the box dropping onto the plane and obviously stopping dead and jsut sitting there, not moving.. not very realistic for what's meant to be water!
What i've done now is to make the box ignore the water plane, just drop through it but i've attached to the box, via a spring, a small sphere which does collide with the water plane. So what happens is the box falls through the water plane a little and the sphere hits the water plane and stops. The box then goes under the water a bit and then bounces back up, due to the spring connection to the sphere, and then bobs up and down and comes to a halt as the spring comes to rest.
Here's a picture showing what i mean:
![Image](http://img.photobucket.com/albums/v232/SiliconMessiah/Untitled-2-1.png)
Obviously when the spring's at rest it's no longer bouncing up and down, but i figure i can then apply some forces according to the height of the waves at that point (taking a sin value that's used to create the wave height as well so no extra work) to lift it back up a little and then it will drop and the spring will do its business.
Any thoughts on this? I ran this by FMX yesterday and he seemed to think it was a good idea and as it works i guess it is but i thought i'd run it by others to get more input on it and any extra suggestions!