[ODE] buoyanc problem (dBodyAddForce/Torque)

Thomas Carrabs gaffiere at gmail.com
Wed Jul 4 04:40:47 MST 2007

Hi at all!
     I'm writing a little simulation of buoyancy, and it seems to work with
normal rigid body, i.e. with uniform mass.
Now, I've a problem with composite objects. I create I box and within it 2
other little boxes of different density: in this way the center of mass is
no longer coincident with object's centroid. Collision with other objects
works properly. But, when I apply the buoyancy and drag force, plus the
torque it reacts as they were applyed to the centroid instead of the right
mixing of cm and center of buoyancy.
Here the buoyancy function: (Erin Catto rulez with "exact buoyancy for


To calculate the submerged volume I consider the point of the bigger geom
and calculate thetraedrons  resulting by the intersection of the geom with a
plane reppresenting the water surface. To define thetra I consider points of
the geometry and the centroid of the object.

Thanks and sorry for my bad english

Dalla cenere rinascere Fuoco

First They Ignore You...
Then They Laugh At You...
Then They Fight You...
Then You Win...
Mohandas Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ode.org/pipermail/ode/attachments/20070704/f6a5521e/attachment.htm

More information about the ODE mailing list