[ODE] Displaced mass

John Donovan JohnD at MagentaSoftware.com
Fri Jun 3 14:08:39 MST 2005


Hi,
apologies in advance if this has already been covered, but the link to
the large archive for download is broken (I'll email the appropriate
person in a tic). If it has been covered, then a pointer to the
date/thread would be useful so I can d/l the relevant mothly archive.

I'm unclear on how I can displace the mass of a body. I have a body with
a sphere geom "attached" to it. What I want to do is offset the CoM of
the body down a little bit so I end up with a sphere with the weight at
the bottom to stabilise it.
I have a transform geom attached to the body, and a regular geom
attached to that. I call:

dMassTranslate (&_mass, offset.x(), offset.y(), offset.z());
dBodySetMass (_body, &_mass);

Which almost works, but as the sphere rocks from side to side, it
penetrates the ground plane the greater the angle from the vertical, and
rests correctly on it when it is vertical.
My nearCallback is the standard one in the docs (and lifted from one of
the samples). Do I need to take into account my transform geom somehow
in nearCallback?

John Donovan

The content of this message and any attached file are confidential and/or privileged and are for the intended recipient only. If you are not the intended recipient, any unauthorised use, disclosure, copying, distribution or other dissemination is strictly prohibited. If you receive this message in error please notify the sender immediately by email, telephone or fax and then delete this email. Any attachment with this message should be checked for viruses before it is opened. Magenta Software Limited cannot be held responsible for any failure by the recipient to check for viruses before opening any attachment. Copyright in this email and attachments created by us belongs to Magenta Software Limited. Should you communicate with anyone at Magenta Software Limited by email you consent to us monitoring and reading any such correspondence. 






More information about the ODE mailing list