Where was p_feedbackJoint2 defined? Where does it point to?
> p_feedbackJoint2 = dJointGetFeedback(joint2);
This call is useless.
> if( o1 == gAvatar){
> printf("1 %e %e %e ",-feedbackJoint2.f1[0],-feedbackJoint2.f1[1],-
> feedbackJoint2.f1[2]);
Now you are using feedbackJoint2, not p_feedbackJoint2.
Worse yet, no step was performed, so the joints didn't have the chance
to work yet. So you are just reading uninitialized value (or, likely,
the value computed from the last step).
--
Daniel K. O.
"The only way to succeed is to build success yourself"