Simulation stability at different scale

I have a problem dealing with different scales of the same scene.

My first scene is configured with a ragdoll of approximately 2m tall, falling from 20m high. Works well and is quite stable once on the ground, as seen in this video:

Second test is the same scene, but scaled in centimeters (the ragdoll is 200 units tall, the gravity is -980). The falling parts is ok for me (little bit different, but oK), the falling speed seems Ok (both hit the ground at the same approximate time), but once on the ground, the ragdoll is totally unstable, as seen here:

I tried configuring the PxTolerancesScale.length to 100 and the PxTolerancesScale.speed to 10*100, but it didn’t change my result that much, and it’s still unstable (the previous video is with these settings).

I saw in the documentation that my bounceThreshold should also be changed.
But the only bounceThreshold I found about in the documentation was the one in PxJointLimitParameters, and when I tried to change it, I realized the default value was zero (and so is also zero in my first video).

Is there anything I missed to change units of a simulation ? SnippetVehicleScale and SnippetToleranceScale do not seem to do anything more than I did…

Well, I went deeper into this, and I think I get the solution. It seems the problem was a mix of several things:

  • my shapes and gravity were correctly scaled for centimeter units, but I use density, and I had forgotten to scale it into kg/cm3 instead of kg/m3
  • I use PxD6Joint and projection, but my projection linear tolerance was not scaled according to the length (this was actually the source of most of the instability). I think it could be worth adding this info in the documentation
  • I finally found out which bounceThreshold the documentation was referring to, and it’s not the one from the PxJointLimitParameters, but the one set by the PxScene::setBounceThresholdVelocity method

It’s now working quite fine, I hope this subject can help someone someday if they face the same problem :p