My game is slowing down due to PhysX.PxsCMDiscreteUpdateTask
Can anyone help me in this problem. I don’t know how to fix it


I made a few tests and I may have some things that can help:

  • do not move/rotate a rigidbody in the code while the corresponding constraints are activated. In my case I was doing a rigidbody.MoveRotation while freezeRotation was true. I replaced with a simple transform.rotation = … and it got better.

  • Use less vertices in mesh colliders and divide huge colliders (as in “huge bounding box”) in many smaller ones, though you don’t seem to have heavy 3D data according to your screens.

  • avoid resizing collider by code. It seems to trigger some kind of physics data structure rebuilding and the lag can last for a few frames…

I’m not sure this totally solves the problem, but it seems to run smoother this way.

Hope this helps!