I found a similar discussion but links are broken and no conclusion there, and I checked bulletphysics user manual page for constraint, did not find any useful information to interpret the SetAxis() and SetOtherAxis().
In the 13 example, we have head, spione, pelvis bones are all set as box and has the same axis as the world space.
CreateRagdollBone("Bip01_Pelvis", SHAPE_BOX, Vector3(0.3f, 0.2f, 0.25f), Vector3(0.0f, 0.0f, 0.0f),
Quaternion(0.0f, 0.0f, 0.0f));
CreateRagdollBone("Bip01_Spine1", SHAPE_BOX, Vector3(0.35f, 0.2f, 0.3f), Vector3(0.15f, 0.0f, 0.0f),
Quaternion(0.0f, 0.0f, 0.0f));
CreateRagdollBone("Bip01_Head", SHAPE_BOX, Vector3(0.2f, 0.2f, 0.2f), Vector3(0.1f, 0.0f, 0.0f),
Quaternion(0.0f, 0.0f, 0.0f));
Then we have the constraint:
CreateRagdollConstraint("Bip01_Spine1", "Bip01_Pelvis", CONSTRAINT_HINGE, Vector3::FORWARD, Vector3::FORWARD,
Vector2(45.0f, 0.0f), Vector2(-10.0f, 0.0f));
CreateRagdollConstraint("Bip01_Head", "Bip01_Spine1", CONSTRAINT_CONETWIST, Vector3::LEFT, Vector3::LEFT,
Vector2(0.0f, 30.0f), Vector2::ZERO);
What does it meaning for FORWARD
as both axis for pelvis-spine hinge constraint? Does it mean the hinge axis where both part rotate around? It does not look like to me.
What does it mean for the LEFT
axis between head and spine? Is that the twist axis as mentioned in this page? Does not look right to me neither, since twist axis sounds like Y::UP axis for me.
Also, what are those low/high limits? I could guess two angles for the rest 2 axis, but which is for which?
The comment says ‘Interpretation is constraint type specific’ which is obvious and not very helpful. It’d be good to expand that more, e.g. for hinge, 1st angle is for what, 2nd angle is for what; for conetwist, blablabla…
There is very limited documentation about ragdoll and it’s very frustrating to debug it time after time.