Is there a way to avoid this reaction or make it more subtle? I really need it not to bounce but to stick to the spine when the lower or higher angles are reached. I used for all bodies setRestitution(0.0) but it does not appear to help.
What else can I do to avoid such a strong reaction?
The dimensions for the spine and upperarms are:
Code: Select all
SIZE_SCALE = 1.0;
_limb_size[SPINE][X] = 0.305 * SIZE_SCALE;
_limb_size[SPINE][Y] = (0.590 + 0.239) * SIZE_SCALE;
_limb_size[SPINE][Z] = 0.225 * SIZE_SCALE;
_limb_size[SPINE][R] = ((0.305 + 0.225) / 2.0) * SIZE_SCALE;
_limb_size[LUPPERARM][X] = _limb_size[RUPPERARM][X] = 0.311 * SIZE_SCALE;
_limb_size[LUPPERARM][Y] = _limb_size[RUPPERARM][Y] = 0.090 * SIZE_SCALE;
_limb_size[LUPPERARM][Z] = _limb_size[RUPPERARM][Z] = 0.090 * SIZE_SCALE;
_limb_size[LUPPERARM][R] = _limb_size[RUPPERARM][R] = 0.045 * SIZE_SCALE;
Code: Select all
localA.setIdentity();
localB.setIdentity();
localA.setOrigin(btVector3((-getSize(SPINE, X) / 2.0) , getSize(SPINE, Y) / 2.0, 0.0));
localB.setOrigin(btVector3((getSize(LUPPERARM, X) / 2.0) + getSize(LUPPERARM,R), getSize(LUPPERARM, Y) / 2.0, 0.0));
g6dof = new btGeneric6DofConstraint(*getRigidBody(SPINE),*getRigidBody(LUPPERARM), localA, localB, use_linear_reference_frame_a);
g6dof->setLinearLowerLimit(btVector3(0, 0, 0));
g6dof->setLinearUpperLimit(btVector3(0, 0, 0));
g6dof->setAngularLowerLimit(btVector3(0, -M_PI_2, 0));
g6dof->setAngularUpperLimit(btVector3(0, M_PI_2, 0));
And one last question, what does the param use_linear_reference_frame_a? I have tried using it as true and false, but have not found any difference.
Thanks in advance.
PS: Attached is a picture of the ragdoll showing the limb (in black) that is causing the reaction when the Y axis is rotated PI/2 or -PI/2.