[ODE] Movable center of mass?

Nate W coding at natew.com
Mon May 13 20:05:02 2002


On Mon, 13 May 2002 hersh@ri.cmu.edu wrote:

> If there is a simple workaround I'm up for that too.  I can
> encapsulate each object in something that keeps its own center of mass
> variables, and when you set or get the position of the object it adds
> or subtracts the offset.  

If you have any joints attached to the object?  If so, it seems to me they
would be a bit more tricky to 'displace' that way.

That does give me an idea, though... suppose you create a small, heavy
'dummy' body within the body in question.  Disable collision testing for
the dummy body, and attach the dummy to the 'real' body with a slider
joint (or two, or three).  Then you can use the sliders to move the inner
body around, effectively changing the outer body's mass distribution.
Not pretty, but it might work. :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com