Offset rigid bodies for (kinematic) ragdolls

B_old
Posts: 79
Joined: Tue Sep 26, 2006 1:10 pm

Offset rigid bodies for (kinematic) ragdolls

Post by B_old »

The subject is strangely formulated but I will try to explain.

Given a skeletal animation I would like to add rigid bodies to some of the bones so as to have a kinematic ragdoll. So when a certain limb is moved I will have a rough representation of that in the physics world.
The problem is, that bone for the head for example lies at the bottom of the head instead of the middle, so I can't just attach a shape to that, as I would to an box for instance.
What I thought of, is making a custom motion state, that includes a constant offset and rotation that is applied to the bone position before passing the transformation to bullet.
Does this sound like a reasonable idea or is my problem even common? Would this also work OK if I decide to make the bodies dynamic and let them drive the skeleton instead of the animation?

In way it boils down to adding a ragdoll to a skinned character.