I’m having an issue with physics2d when multithreading is on. I have some floating platforms in my game, they are basically a BoxCollider2D with a Dynamic Rigidbody2D and a script that applies a force on FixedUpdate to perform the intended movement. When multithreading is off it performs as expected, but when I turn it on, it feels like the boxes are 10 times as heavy and the platforms start to wiggle a lot.
Setting useConsistencySorting to true or to false doesn’t help. I’ve also tried tweaking the other values, with no luck.
Steps to reproduce:
Create a new project with the default 2D template on Unity 2019 LTS
Thanks for the report, I’ll take a look at it on Monday. If you don’t mind, could you create a bug report case with the attached project and send me the case number. It’s not vital but it would allow you to track any fix.
So I’ve isolated the issue thanks to your great reproduction project.
It turns out it’s related to the use of the XY constraints in the multi-threaded version of the solver. If you turn off the XY position constraints then the issue will go away which demonstrates this being the source of the problem. It’s related to how contact masses are constrained along the contact normal in relation to the XY constraints.