[ODE] Center of mass problem

Tim Sorrells tsorrells at breakawayltd.com
Wed Jan 10 18:48:54 MST 2007


Alright so I have a capsule that keeps wanting to stand up on one end,
rather than settle down lengthwise and look like a real world object.
As I understand it the dMassTranslate function moves a mass relative to
its body (although I honestly would love to simply point it at a geom
and not have to configure it separately).  I give my geom a
<0.0,0.0,0.25> offset and then I try to move the mass to the center of
the object by giving it a translate of <0,0,0.25>.  But my capsule keeps
standing up.  I've tried changing around all the various x,y,z params to
dMassTranslate and while they produce a variety of unwanted effects,
nothing I've tried will get my capsule to act like a balanced capsule.

 

Here's the order of operations, since I've noticed ODE is very
unforgiving if you call functions out of order:

 

// Spawn body and setup geom

 

dGeomSetBody()

dGeomSetOffsetWorldPosition()

dGeomSetOffsetWorldRotation()

dMassSetCapsuleTotal()

dMassTranslate()

dBodySetMass()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mooshika.org/pipermail/ode/attachments/20070110/10fcf0a1/attachment.htm


More information about the ODE mailing list