Hello, I am trying to kepp an object on a plane, witch seemed easy to me but I have problems to do that.
I use a matrix (rotation+translation) representing the position of the plane, this plane will move but for now I just put it on a fixed position an orientation.
I did something like that:
NewtonJoint* joint=NewtonConstraintCreateUserJoint(nWorld, 6, customcallback, objectbody, NULL);
Then in my callback I first calculate 3 points on my object with the same position in x ( A, B, C)
I next calculate the position of these points in the plane space, I modify their x position to 0 and recalculate their new position in the object space (I get newA, newB, newC)
To finish I add 3 linearrow , (one for each points) like that:
NewtonUserJointAddLinearRow (Joint, &A.x, &newA.x, &dir.x);
But my object stay on its "starting 2d plane" whatever position I take for my plane.
Is this method correct ?
THanks