diff --git a/Demos/ConstraintDemo/ConstraintDemo.cpp b/Demos/ConstraintDemo/ConstraintDemo.cpp index 14d8bacd3..0983dacf0 100644 --- a/Demos/ConstraintDemo/ConstraintDemo.cpp +++ b/Demos/ConstraintDemo/ConstraintDemo.cpp @@ -73,6 +73,7 @@ void ConstraintDemo::initPhysics() trans.setOrigin(btVector3(2*CUBE_HALF_EXTENTS,20,0)); isDynamic = true; btRigidBody* body1 = localCreateRigidBody( isDynamic,mass,trans,shape); + body1->setDamping(0.3,0.3); getDynamicsWorld()->addCollisionObject(body1); diff --git a/Demos/OpenGL/DemoApplication.cpp b/Demos/OpenGL/DemoApplication.cpp index 1936d4c18..fa9ee66f6 100644 --- a/Demos/OpenGL/DemoApplication.cpp +++ b/Demos/OpenGL/DemoApplication.cpp @@ -335,7 +335,8 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y) break; } - getDynamicsWorld()->getDebugDrawer()->setDebugMode(m_debugMode); + if (getDynamicsWorld()->getDebugDrawer()) + getDynamicsWorld()->getDebugDrawer()->setDebugMode(m_debugMode); glutPostRedisplay();