(27-10-2019, 04:47 PM)josemendez Wrote: Hi there,
This is caused by slow convergence. That is, the solver has not enough time budget each frame to finish solving the system perfectly, so the remaining error shows up as spurious elasticity. This is common to all physics engines, not just Obi.
So solutions are the same as in any engine:
- Increase the amount of constraint iterations (distance constraints in this case, you can find this setting in the ObiSolver component)
- Increase the amount of solver substeps (also in ObiSolver)
- Reduce Unity's fixed timestep (found in project settings->time).
- Reduce the amount of constraints (that is, use a lower-resolution mesh for the bag). This will reduce the solver's workload.
See:
http://obi.virtualmethodstudio.com/tutor...gence.html
http://obi.virtualmethodstudio.com/tutor...olver.html
To optimize coin colliders, try using a single distance field for each one instead of 4 colliders:
http://obi.virtualmethodstudio.com/tutor...ields.html
Thank You! I reduced Unity's fixed timestep to 0.009 and it helped.
I made few tests and I got that particle collision takes 90% of my resources. But I already had particle collision constraint iterations to 1 and solver substeps to 2.
Do you have any ideas how to fix it?
I can't turn off particle collision...