Compound Body Problems
Posted: Thu Jun 23, 2011 6:02 pm
Hi,
I'm trying to solve a problem I've had for a while with compound bodies...
My setup has a compound body that I create from a list of CompoundShapeEntries that all have various positions, masses and dimensions.
The main body is the heaviest, and the other bodies are lighter and used for collision purposes (scattered around the main shape).
The issue is that the position of the shapes that are rendered by the model drawer are not matching the ones that I render myself, so things touch the ground when they shouldn't be...
I looked at the code that creates the shapes inside the compound body and it seems to move things around a center of mass.
It probably explains why moving the heavy body around moves all the smaller shapes around...
There must be something I don't quite understand with this
How can I make sure that the position of the compound shape children match what I have set in the CompoundShapeEntries?
Thanks
Matt
I'm trying to solve a problem I've had for a while with compound bodies...
My setup has a compound body that I create from a list of CompoundShapeEntries that all have various positions, masses and dimensions.
The main body is the heaviest, and the other bodies are lighter and used for collision purposes (scattered around the main shape).
The issue is that the position of the shapes that are rendered by the model drawer are not matching the ones that I render myself, so things touch the ground when they shouldn't be...
I looked at the code that creates the shapes inside the compound body and it seems to move things around a center of mass.
It probably explains why moving the heavy body around moves all the smaller shapes around...
There must be something I don't quite understand with this

How can I make sure that the position of the compound shape children match what I have set in the CompoundShapeEntries?
Thanks
Matt