I try one mode time.
in Newton 3.14 the drag coefficient was set on by default. this was done because back them, physics engines only had three collision shapes: spheres, capsules and boxes.
so when people placed bunch of spheres and capsules in a map, they never went to sleep and slow down the engine a lot.
I decide that to prevent that I set drag by default.
over the years people has criticized that a great deal, some even accused me that the engine was stable because of that, same happen with auto sleep that was also on by default and people accused me that auto was no possible to turn off.
I do not really care about people opinion of the engine, but I realized that having the drag on by default hide that bug in the engine and I never that chance to fix.
Now for 4.xx those functionalities are off by default. it is up to the app to apply then when they create a body or when they want to.
I just added the drag coefficient so that you can see how it work.
if you sync you will see that the capsule will go to rest.
But that is is no correct. if a user wnat to make a phitop, the the fact that it needs drag to make work, makes such basic and fundamental task impossible. the solution is to have the angular momentum calculation correct and the ability to add Drag also correct but and both independent of each other.
to apply viscous drag you just call this
- Code: Select all
body->SetLinearDamping(dFloat32(0.1045f));
body->SetAngularDamping(dVector(dFloat32(0.1045f)));
to apply dry rolling friction it needs the joint, but that joint has not been ported from 3.14 yet.