27-10-2019, 04:47 PM
(This post was last modified: 27-10-2019, 04:49 PM by josemendez.)
(25-10-2019, 10:31 PM)IlyaZzz Wrote: So, does anybody know how to fix it?
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