Static object motion: compound shape vs. separate objects?

User avatar
ejtttje
Posts: 96
Joined: Mon Nov 03, 2008 9:57 pm

Static object motion: compound shape vs. separate objects?

Post by ejtttje »

I have a set of connected static objects which need to change configuration during execution. Previously these were all grouped as a single compound shape. If I want to smoothly reconfigure the components, should I approach this as modifying the compound shape, or should I divide the pieces into separate static bodies?

Are there trade-offs in simulation fidelity (granted moving static objects are already asking for trouble), or perhaps performance issues with one approach vs. the other? Thanks!
User avatar
ejtttje
Posts: 96
Joined: Mon Nov 03, 2008 9:57 pm

Re: Static object motion: compound shape vs. separate objects?

Post by ejtttje »

I'm starting to think this would be easier if the appendages have mass after all, and just the root body be static... or maybe not even that.

What I'm really trying to do here is simulate a legged robot. In the "normal" mode, everything has mass and is a dynamic object, so the legs can slide around and whatnot in a physics based manner.

In the other mode which I'm working on now, we want "perfect" locomotion, where the feet are fixed when they are supposed to be making contact, and I move the body in response to keep the contact points fixed. So what I'm really asking is the best way to implement this. Perhaps I should keep everything dynamic and just put a Point2Point constraint with the world at the foot contact instead of 'manually' calculating and applying the body motion myself?

This seems like the right way to do it now that I've been thinking more, I've been led astray by my initial impulse to merge in previous work outside of the physics simulation where I was doing all these manual calculations, but now I can just let Bullet handle it instead... :)