diff options
author | erwin coumans <erwin.coumans@gmail.com> | 2021-04-20 11:14:28 -0700 |
---|---|---|
committer | erwin coumans <erwin.coumans@gmail.com> | 2021-04-20 11:14:28 -0700 |
commit | fd154cee8f352b9e23c73b2c87dac4bdf27ad016 (patch) | |
tree | 6ffda801a2e03cef4520a42777ca3fa1c01befd8 | |
parent | 78f5b141f92750b8ff0921052d7e9e649e2a457c (diff) | |
download | bullet3-fd154cee8f352b9e23c73b2c87dac4bdf27ad016.tar.gz |
set default sleeping threshold for useMaximalCoordinate btRigidBody to be similar to btMultiBody (0.05)
-rw-r--r-- | examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp b/examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp index e41ef7881..815e8b9bf 100644 --- a/examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp +++ b/examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp @@ -33,6 +33,10 @@ class btRigidBody* MyMultiBodyCreator::allocateRigidBody(int urdfLinkIndex, btSc { btRigidBody::btRigidBodyConstructionInfo rbci(mass, 0, colShape, localInertiaDiagonal); rbci.m_startWorldTransform = initialWorldTrans; + btScalar sleep_threshold = btScalar(0.22360679775);//sqrt(0.05) to be similar to btMultiBody (SLEEP_THRESHOLD) + rbci.m_angularSleepingThreshold = sleep_threshold; + rbci.m_linearSleepingThreshold = sleep_threshold; + btRigidBody* body = new btRigidBody(rbci); if (m_rigidBody == 0) { |