I added the interface for designating a contact point as a soft contact.
- Code: Select all
void NewtonMaterialSetAsSoftContact (const NewtonMaterial* const material, dFloat relaxation, dFloat springCoef, dFloat damperCoef);
soft contact meaning a contact point that uses penetration to calculate a recovering acceleration that is proportional to the penetration.
this acceleration only control a fraction of the total reaction force at the contact point, the rest is calculated by the rigid body solver.
the final implementation is not ready yet, only the relaxation is applied at this time, the spring and damper are ignored at the moment therefore the contact will sink slowly until it reaches the equilibrium.
This is the exact setup you saw in the video, which was hard coded.
Now I can complete the rest.