Julio Jerez wrote:In thsi video;
http://www.digitalsmoke.us/ISUHDR.movI noticed that in teh beginning to move teh Puck to teh side, and It stops on teh edge of teh Track.
Is there a force, a wall or something the pushes the Puck back to the track?
I say this because I see that the net force has a side compoment when it moves parallel to the edge touching the edge, but as soon as it gets off the edge
the force is parallel to the direction of motionas it should be.
There's no wall or anything. Initially the puck is moved to the side of the table by calls to NewtonBodySetMatrix(). Then a velocity (0, 0, -1) is applied to the puck and the physics takes over from there.
Julio Jerez wrote:Just to see if it is the friction calculation cuase the side force, try both
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 0);
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 1);
with that the Puck must go straight because it will be frictionless, the net force should not change direction like is shows in the videos
So I tried this, and although I got different results, the puck still didn't go straight. However, if I change my call to
NewtonMaterialSetDefaultFriction() to pass in a 0 dynamic friction, then the puck does go straight like expected. Here are some videos:
1. Without calling NewtonMaterialSetContactFrictionCoef()
http://www.digitalsmoke.us/ISUHDR.mov2. With call to NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 1)
http://www.digitalsmoke.us/ISUHD31_new_1.mov3. With calls to
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 0)
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 1)
http://www.digitalsmoke.us/ISUHD31_new_2.mov4. Without calling NewtonMaterialSetContactFrictionCoef(), but with setting dynamic friction to 0 via NewtonMaterialSetDefaultFriction()
http://www.digitalsmoke.us/ISUHD31_new_3.mov------
Another puzzling thing is that with the other example I had where the puck falls off the table, I still can't get it to go straight.
1. Without calling NewtonMaterialSetContactFrictionCoef()
http://www.digitalsmoke.us/ISUHDL.mov2. with setting both static and dynamic friction to 0 via NewtonMaterialSetDefaultFriction(), and also calling
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 0)
NewtonMaterialSetContactFrictionCoef(pMaterial, 0.0f, 0.0f, 1)
http://www.digitalsmoke.us/ISUHD31_new_4.movDoes this give any other clues?