Ragdoll problem in newtonCreateConvexHull

Vectrex

17-02-2007 09:01:31

I have got the zombie ragdoll working in my game that behaves fine. However I am currently trying to add my own model and bone structure and when I press the key to turn the model into a ragdoll it crashes on newtonCreateConvexHull. The model has a biped skeleton and I have even tried weighting all vertices to the head bone but that doesn't change anything. Below is the bone heirarchy in the xml file, any help is much appreciated.

<RagDoll>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="15" skeleton_bone="Pelvis">
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="10" skeleton_bone="Spine_01">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="14" skeleton_bone="Spine_02">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="20" skeleton_bone="Spine_03">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="8" skeleton_bone="UpperArm_Right">
<Joint type="ballsocket" pin="1 0 0" limit1="40.0" limit2="20.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="6" skeleton_bone="Forearm_Right">
<Joint type="hinge" pin="1 0 0" limit1="-5.0" limit2="30.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="4" skeleton_bone="Hand_Right">
<Joint type="ballsocket" pin="1 0 0" limit1="50.0" limit2="20.0"/>
</Bone>
</Bone>
</Bone>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="8" skeleton_bone="UpperArm_Left">
<Joint type="ballsocket" pin="1 0 0" limit1="40.0" limit2="20.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="6" skeleton_bone="Forearm_Left">
<Joint type="hinge" pin="1 0 0" limit1="-5.0" limit2="30.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="4" skeleton_bone="Hand_Left">
<Joint type="ballsocket" pin="1 0 0" limit1="50.0" limit2="20.0"/>
</Bone>
</Bone>
</Bone>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="6" skeleton_bone="Neck">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.5 0.0 0.0" mass="12" skeleton_bone="Head">
<Joint type="ballsocket" pin="0 1 0" limit1="10" limit2="5"/>
</Bone>
</Bone>
</Bone>
</Bone>
</Bone>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="15" skeleton_bone="Femur_Left">
<Joint type="ballsocket" pin="0 -1 0.2" limit1="30.0" limit2="15.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="10" skeleton_bone="Calf_Left">
<Joint type="hinge" pin="0 0 1" limit1="-5.0" limit2="20.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="6" skeleton_bone="Foot_Left">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
</Bone>
</Bone>
</Bone>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="15" skeleton_bone="Femur_Right">
<Joint type="ballsocket" pin="0 -1 0.2" limit1="30.0" limit2="15.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.3 0.0 0.0" mass="10" skeleton_bone="Calf_Right">
<Joint type="hinge" pin="0 0 1" limit1="-5.0" limit2="20.0"/>
-<Bone dir="0 1 0" length="0.0" shape="hull" size="0.1 0.0 0.0" mass="6" skeleton_bone="Foot_Right">
<Joint type="ballsocket" pin="0 1 0" limit1="20.0" limit2="10.0"/>
</Bone>
</Bone>
</Bone>
</Bone>
</RagDoll>

walaber

17-02-2007 19:13:29

if any of those bones have less than 4 vertices attached to them, that bone will probably crash when it tries to make a convex hull from it, because there are not enough vertices to make a hull.