The Newton I am using is GMNewton from 2011. I am not sure what version of Newton this is, I assume it is Newton 2.0 because it has a function called GmnCollisionGetContactCount(). GMNewton has no documetation, only a couple comments on the scripts. The closest thing I could find to this in the official documentation is NewtonContactJointGetContactCount() which is only in GMNewton2.0. Thus through deductive reasoning I assume GMNewton uses Newton 2.0.
So what I am trying to do is exclude collisions from their own body. For example, I want each car of a wheel to return if it is touching an object, but not to return a collision with the chassis of the car it is touching. I have tried everything, from assigning the chassis and wheel to two different materials, and disabling collision between the materials, and disabling collision between joints, and it still returns a collision when it touches it's own chassis. So I am left with the functions GmnCollisionGet(), GmnCollisionGetNext(), GmnCollisionGetContactCount () and GmnCollisionGetObject(). They are poorly documented and so far I have not been having any luck. But I have read the documentation again and this time I will try putting joint ids in the functions. I will keep you posted.
(I cannot use raytracing either, because it would be too long to explain, I need the actual contacts of the wheels. But even if, hypothetically, if I could use raytracing, it would still not work because I can't disable the ray from detecting certain objects or materials. In any case, just forget about the whole raytracing thing, I mainly need help with the non-raytracing collision functions.)
Also, there seems to be no function of NewtonMaterialGetContactPositionAndNormal() in GMNewton.