i'm trying to attack 2 hinge joints between 2 models but so far with no success...
doing so:
- Code: Select all
pinPivMatrix.clear;
pinPivMatrix.M[2] := 1;
pinPivMatrix.M[4] := 1;
pinPivMatrix.M[9] := 1;
pinPivMatrix.M[15] := 1;
pinPivMatrix.M[12] := irrMat.getTranslation.x;
pinPivMatrix.M[13] := irrMat.getTranslation.y;
pinPivMatrix.M[14] := irrMat.getTranslation.z;
wheels[wheelCount-1].obj.m_Joint := CreateCustomHinge(pinPivMatrix.pointer, wheels[wheelCount-1].obj.m_NewtonBody, vehicleBody.obj.m_NewtonBody);
this works fine, but then i'd like the 2nd joint added also
- Code: Select all
pinPivMatrix.clear;
pinPivMatrix.M[0] := 1;
pinPivMatrix.M[5] := 1;
pinPivMatrix.M[10] := 1;
pinPivMatrix.M[12] := irrMat.getTranslation.x;
pinPivMatrix.M[13] := irrMat.getTranslation.y;
pinPivMatrix.M[14] := irrMat.getTranslation.z;
wheels[wheelCount-1].obj.t_Joint := CreateCustomHinge(pinPivMatrix.pointer, wheels[wheelCount-1].obj.m_NewtonBody, vehicleBody.obj.m_NewtonBody);
in which case it is locked in position with absolutly no movement whatsoever... how can i do this? i have been looking for a solution for 6-7 hours, including searching the forum upside down and googling everything i could think of. hope someone can help. thanks.