I believe that link is only regarding the internal hinge joint. From the Newton Wiki Newton Wiki: "The internal Hinge joint is a legacy join form previous version that we do not recommend continue using."

I am interested in using the CustomHingeJoint from the new joint library in Newton 2 (especially because it has built in joint limits).

I had trouble figuring out what the pinsAndPivoChildFrame matrix was supposed to be but I figured it out...here's an example

Code:
//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);



Last edited by yorisimo; 12/07/09 22:21.

Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing