Cloth: New collision algorithm
The current cloth collision algorithm is quite confusing.
It has some mysterious magic numbers, it also has some incomprehensible
differences between self-collision and collision in addition to other
complications.
I spent a lot of time trying to understand it, but in the end it pays
more to do another collision algorithm from scratch.
In the new collision algorithm we have:
- Improved collision response;
- The friction factor is more noticeable (before the difference was minimal);
- The damping factor now works on cloth too (it only worked for soft bodies).
In addition to the new collision algorithm, this patch also:
- Corrects an error in the BVHTree Kdop epsilon;
I haven't made a benckmark yet but this patch should be slightly faster.
GIFs:
Friction Test (100% and 0%):
Damping Test (0.0 and 1.0):

