Does Havok have support for buoyancy, or 'water volumes'?
Thanks very much for any help!
We have dabbled wit buoyancy in the past. The easiest way (although there may be other ways) to get this done is to have an AABB phantom that covers your water. Then when your rigid body enters into the phantom, add a unary action to the rigid body. In the action, you will have to do the buoyancy calculations. There have been some acticles about doing buoyancy calculations in Game Gems 1 and 6 (I believe), if you have those available.
One way to do the calculations is with a "globrep" model. The idea here is that you do point tests at regular intervals inside the rigid body. If the point is inside, then your put a sphere in that position. You can use the sphere information to do the buoyancy calculations.
Let me know if this helps.
I had a quick go at playing with buoyancy the other day and ended up with something not too bad. Probably not that useful to you, but I may aswell post just incase!
My approach was similar to the above, a phantom box to describe the water area. For each rigid body I had already stored values for volume and density when I was creating the bodies. By comparing the densities of bodies in/under the phantom to a base water value, and then multiplying that value obtained by the volume of the shape, i ended up with a very simple, but nice looking pool of water with a few different material'ed shapes floating or sinking in it.
This of course allowed me to easily tweak a few constants in my material system to change the density of the water pool and other things to more 'fun' values!