@@ -197,20 +197,20 @@ void WbHinge2Joint::applyToOdeAxis() {
197197 if (mSpringAndDampingConstantsAxis1On && mSpringAndDampingConstantsAxis2On ) {
198198 // axes 0 and 1 of the AMotorAngle are enabled
199199 dJointSetAMotorAxis (mSpringAndDamperMotor , 0 , 1 , a1.x (), a1.y (), a1.z ());
200- dJointSetAMotorAxis (mSpringAndDamperMotor , 1 , 1 , a2.x (), a2.y (), a2.z ());
200+ dJointSetAMotorAxis (mSpringAndDamperMotor , 1 , 2 , a2.x (), a2.y (), a2.z ());
201201 } else if (mSpringAndDampingConstantsAxis1On ) {
202202 // only axis 0 of the AMotorAngle is enabled
203203 dJointSetAMotorAxis (mSpringAndDamperMotor , 0 , 1 , a1.x (), a1.y (), a1.z ());
204204 } else
205- dJointSetAMotorAxis (mSpringAndDamperMotor , 0 , 1 , a2.x (), a2.y (), a2.z ());
205+ dJointSetAMotorAxis (mSpringAndDamperMotor , 0 , 2 , a2.x (), a2.y (), a2.z ());
206206 }
207207 } else {
208208 parsingWarn (tr (" Hinge axes are aligned: using x and z axes instead." ));
209209 dJointSetHinge2Axis1 (mJoint , 1.0 , 0.0 , 0.0 );
210210 dJointSetHinge2Axis2 (mJoint , 0.0 , 0.0 , 1.0 );
211211 if (mSpringAndDamperMotor ) {
212212 dJointSetAMotorAxis (mSpringAndDamperMotor , 0 , 1 , 1.0 , 0.0 , 0.0 );
213- dJointSetAMotorAxis (mSpringAndDamperMotor , 1 , 1 , 0.0 , 0.0 , 1.0 );
213+ dJointSetAMotorAxis (mSpringAndDamperMotor , 1 , 2 , 0.0 , 0.0 , 1.0 );
214214 }
215215 }
216216}
0 commit comments