One thing you could do is use the dynamic body AABB (or better, OBB) and see if it intersect with the water volume AABB/OBB. You would have to do that test on your frame update.pwr wrote:I've created a ghostobject and tried that but didn't have any success. This is could be caused by me doing something wrong. So I was trying the other solution described above. I'm thinking that it would be more easier to simply check if an body is inside the water body. Then I don't have to care if the contact points is from the object traveling into the water or out from the water. Is this doable with a GhostObject? Do anyone have any sample code that I can use?
As far as i know, this is basically what the broadphase is doing so you might be able to query the broadphase just to know if the volumes intersect.
Using one of these solution will always tell you if a object is inside another one