Page 1 of 1

Upgraded from v2.81 to v2.85, physics is now different!

Posted: Mon Jan 02, 2017 7:04 pm
by SRGBulletPhysics
Hi,

I recently upgraded to v2.8.5 from GitHub. I was using v2.8.1 before. My simulation now does not work the same as it did.

My simulation is a sphere on a large flat box. A small force is applied to the sphere. The sphere should move.

In v2.8.1, the sphere moves along the box's surface then comes to rest gradually.
In v2.8.5, the sphere comes to an abrupt stop.

Sphere Physics Values:
Mass= 1 / Friction=1 / Restitution=1 / Gravity=120 / Linear Dampening=0.6 / Angular Dampening=0.6

Box Physics Values:
Friction=1 / Restitution=0.5 / Gravity=10


Things i have tried.
I have used WinMerge to check that its not any recent changes to my own code.
I have also tried my simulation with v2.8.1 again to check if it works as expected. It does(meaning the ball comes to rest gradually).

So my question is, do i need to recalibrate my simulation for each version of bullet?
Or is there another issue that could be causing this, unrelated to the version of bullet i choose to use?

Re: Upgraded from v2.8.1 to v2.8.5, physics is now different

Posted: Tue Jan 03, 2017 6:20 am
by drleviathan
I assume you mean you moved from Bullet-2.81 to Bullet-2.85.

I would expect a gently rolling sphere to indeed get stopped rather suddenly. The expected behavior is that an active object will be deactivated if its linear and angular velocities are below 0.8 m/sec and 1.0 rad/sec respectively for more than 2 seconds AND if all the other objects in its simulation island are ready for deactivation. My experience has been that these thresholds are higher than I want for such gently bumped objects.

I checked, and none of the hard coded default thresholds have changed between 2.81 to 2.85. Which make me conclude that 2.81 was bugged! Why wasn't your active sphere getting deactivated when it should?

Try explicitly setting the sphere's deactivation thresholds to smaller values (1) to verify that the deactivation is responsive to your tuning, and once you're convinced you really are dialing a knob that does what you expect go ahead and tune it until you recover the behavior you really want. You can assume that the deactivation systems will continue to work correctly in later versions of Bullet.

(1) Use btRigidBody::setSleepingThresholds(btScalar linear, btScalar angular)