Game Development Community

How to setup ragdoll

by Afan Olovcic · in Game Mechanics Kit · 11/22/2009 (4:44 pm) · 6 replies

Hi

How to setup RagDoll scelet my character is one leg character , and a lot smaller .

what is the params :

boneSize[1] = "0.2 0.2 0.0";
boneOffset[1] = "0 0 0";
boneJointParam[1] = "0 1.57 0";

Any help on this please


#1
11/30/2009 (10:12 am)
Yeah, I should definitely write more info on this.


You can type "drawPhysics(1)" from console to visualize ragdolls in debug mode.

boneSize - is a 3d size of a ragdoll bone,
boneOffset - offset relatively to position of corresponding node in animation skeleton.
boneJointParam[1] - is a params of joint (restrictive angles), you should refer to joints description of Bullet or PhysX
#2
12/02/2009 (6:15 am)
Thanks Yuri
#3
01/26/2010 (8:39 pm)
@Yuri: I'm running the game in debug mode, but I still get the
input <0>: Unable to find function drawPhysics
when trying to visualize the ragdolls.
#4
02/22/2010 (11:16 am)
drawPhysics is for the bullet physics implementation only. Are you using it?
#5
02/26/2010 (5:08 am)
Yeah, and I figured it out. The command is actually "physicsDraw" ;)
Came upon another problem though. Used the examples ragdolls to create one for my own model, but it behaves really weirdly in motion. Is there any way to force a ragdoll to stay in T-pose, so I can inspect the collision boxes? For now I'm just adding them one by one, even if it is a bit messy this way.

EDIT: I might have found my problem. The capsules seem to be rotated 90 degrees wrong. How can I solve this? Either that, or I'm doing something wrong with the boneSize parameter. I assume it works like normal 3d sizes, ie. "x y z", but it was hard to see if it actually works like this when viewing the physics in-game.
#6
03/05/2010 (5:09 am)
@Christian Gjerde Jensen

Sorry for delay, we were pretty busy with our Guide Bot release.

You set rotation angles for physics shape relatively to animation bone. by providing boneRotAngles (in degrees). While doing this you need to set manualBoneRotations = true in RagDollData.


For the debug reasons if you want to stop ragdoll from moving and remaining in T-pose you can just set boneMass to zero.