//about x axis
float pinPivotMatrix[16] = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
//about y axis
//float pinPivotMatrix[16] = {0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
//about z axis
//float pinPivotMatrix[16] = {0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1};
//Set the position of the pivot point
pinPivotMatrix[12] = 160*QUANTTOMETER;
pinPivotMatrix[13] = 147*QUANTTOMETER;
pinPivotMatrix[14] = 400*QUANTTOMETER;
NewtonUserJoint* nujoint = CreateCustomHinge(pinPivotMatrix, nbodyChild, nbodyParent);
HingeEnableLimits (nujoint, 1);
float ub = 45*DEG2RAD;
float lb = -45*DEG2RAD;
HingeSetLimis (nujoint, lb, ub);