if you want stiffer joints, you can change this define
- Code: Select all
#define DG_PSD_DAMP_TOL dgFloat32 (1.0e-3f)
in file: ..\source\physics\dgWorldDynamicUpdate.h
you will have to buidl the engione with double presition because it will generate jacobian matrices with very high condition numbers that in must case a 32 bit float can no handle.
you can make the define 1.0e-4, do not make it zero, because it will generate matrices with infinity condition numbers with tow riow are linreal combination of the other.
The only way to trully elimintate overdeterminacy is by having a Singular value decomposition that precondition the matrix by finding wich rows are ill conditions,
and either apply the damp on per row bases or remove it all togeter.
That was what newton 1.0 did on block diagonal contact matrices in the beginning, but SVD is too expensive even for block diagonal matrices.
A contact joint can have 48 rows, some time even more but I capp it to that. SVD is a very elegante way to filter bad contacts,
specially multiple contact across edges, or contact with different position but with the same line of action, and many more configuration that are hard to detect geometrically.
you do no really have to worry about all the gemetrical mombo jumbo, you need to do preprosessing contact, but unfortunally it is too slow for a realime engine, it is beter to filter then by projection
then to 2d convex hull of teh colliding plane and pick the extreme points on the hull.
Also you will have to run at higher frame rate to avoid extreme large forces generated by impulse over a long time step.
that is how the math of lagragian dynamcis works. and I can not do much about that.
So the answer yes but it does not come for free, if comes at the expence for more CPU time, so you do it at your own peril.