Changing the Damping of an Object in Realtime

Hey guys. I wrote a buoyancy script for our game, so objects (including the player) can float in water. But the bobbing of the objects in the water is a little excessive. It works perfectly and looks really realistic if I turn the damping on the objects up to .75. But I can’t have the damping so high when the objects are not in the water.

By what I can tell, there is no way to change the damping via Python, is there? And the other solution I thought of was writing a custom damping script. Does anyone know how to solve this? Thanks!

bump… im sure someone can help me with this

The only adjustable damping I can see is for servo motion.

Two ideas:
A) apply damping forces via Python. I do that at my buoyancy method (see signature)

B) have an invisible “physics” object. The visible “display” object is parented to it. On changing from one medium to the other replace the physics object with another one with other physics settings.

Thanks monster. I’ll take a look at your buoyancy example. And I never thought of using two different physics objects, though that seems impractical when you have lots of different dynamic objects that could fall in the water. But I’ll take a look at your blend file. Thanks!