[ODE] buoyanc problem (dBodyAddForce/Torque)

Jon Watte (ODE) hplus-ode at mindcontrol.org
Thu Jul 5 15:41:00 MST 2007


The "offset" part of the dMass is ignored for a body. The center 
position of the body will always be where the center of gravity is. You 
have to offset the boxes if you want the collision response to be 
off-center, and you have to offset forces/torques you apply if you want 
them to be off-center.

Cheers,

          / h+

Thomas Carrabs wrote:
> 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 
> polyhedra")




More information about the ODE mailing list