eskimo456 wrote:I was wandering how would you split up an odd shape into multiple bounding boxes to be used for collision.
Personally I wouldn't even try. I would just assume them to come out from the asset.
I know UnrealEd will create a bounding box or k-dop for each complex mesh, I think it's a semi-automated process. See
this. Now, you see this is oriented to generating a single shape.
For multiple shapes, I'd point out
GPU Gems Chapter 23. Chapter 23.2.2 presents a multi-shape model representation for particle (hair) collision. It appears to me this must have been a manual process.
eskimo456 wrote:How could I then get the position of the shapes to update with the rigid body??
I'm afraid your understanding of shapes... or at least your terminology is wrong.
Shapes exist "by themselves". They don't move nor collide with anything else. Rigid bodies do. A rigid body is - at its simplest - a shape instanced in the world.For complex shapes however, there's a shortcut.
Create a btCompoundShape, fill it with the required shapes and then instance the btCompoundShape as needed. I hope this makes sense.
eskimo456 wrote:Do I need a rigid body for each shape?
A rigid body can use a single shape (but it can be a compound shape). A shape can be instanced to multiple rigid bodies.
I suppose I'm misunderstanding your question.
eskimo456 wrote:Or can I use the motionState information to effect the shapes?
No, shapes don't move. Rigid bodies do. Rigid bodies can be associated to a motion state, shapes cannot. I'd be extremely careful in changing shapes at runtime, odds are they might need to be removed from the world (that is, all rigidbodies removed, shape removed, everything recreated from scratch to clean collision caches).