How to get ragdolls standing and walking?

SiWi

27-05-2007 14:26:33

I´ve head some success in playing around with OgreNewt, but I wonder how to get ragdoll walking around and standing up. Is there any PytonOgre Sample or C++ Sample, which I could translate?

andy

27-05-2007 14:54:41

There are ragdoll examples in the demos for both OgreOde and OgreNewt..

Check out the respective directories under <python-ogre>demos/

Cheers

Andy

SiWi

28-05-2007 09:21:33

I know that there are ragdoll examples, but I wonder how to get the ragdolls walking and standing up. In the demos I know they are only sleeping on the floor. :)
If there are no demos in C++ or PythonOgre for walking ragdolls with OgreNewt, can you give me some suggestions, what to do?
I think I read some where about making capsules around the ragdolls, but how do I make this capsules standing and isn´t a capsule a little buggy because of e.g. feet sinking in the ground?

saladin

28-05-2007 16:19:40

I know that there are ragdoll examples, but I wonder how to get the ragdolls walking and standing up. In the demos I know they are only sleeping on the floor. :)
If there are no demos in C++ or Ogre for walking ragdolls with OgreNewt, can you give me some suggestions, what to do?
I think I read some where about making capsules around the ragdolls, but how do I make this capsules standing and isn´t a capsule a little buggy because of e.g. feet sinking in the ground?


To get the ragdolls to stand up/walk, you have to have the stand up skeleton animation and the walking SKELETON animation.

1. use [bone].setManuallyControlled(False) to give control back to the skeleton animation.
2. use SceneNode->_getFullTransform() * bone->_getDerivedPosition() to get a bone's world position
3. use SceneNode->_getDerivedOrientation() * bone->_getDerivedOrientation() to get a bone's world orientation quaternion
4. every time before the physics update, repeat step 2 and 3 to set ur physics geometry's joint to synchronize with the skeleton animation's bone movement.
5. OPTIONAL: write special call backs for bone-bullet collision so ur walking ragdoll character's skeleton animation can be interrupted by a gunshot. Upon which point, set skeleton to be manually controlled again and add force where the bullet hits.