diff --git a/testbed/scenes/collisionshapes/CollisionShapesScene.cpp b/testbed/scenes/collisionshapes/CollisionShapesScene.cpp index 7abbf702..f6fda6f2 100644 --- a/testbed/scenes/collisionshapes/CollisionShapesScene.cpp +++ b/testbed/scenes/collisionshapes/CollisionShapesScene.cpp @@ -101,7 +101,7 @@ CollisionShapesScene::CollisionShapesScene(const std::string& name) } // Create all the spheres of the scene - for (int i=0; igetRigidBody()->getMaterial().setRollingResistance(0.08); + // Set the box color sphere->setColor(mDemoColors[i % mNbDemoColors]); sphere->setSleepingColor(mRedColorDemo); @@ -138,6 +141,9 @@ CollisionShapesScene::CollisionShapesScene(const std::string& name) Cone* cone = new Cone(CONE_RADIUS, CONE_HEIGHT, position, CONE_MASS, mDynamicsWorld, meshFolderPath); + // Add some rolling resistance + cone->getRigidBody()->getMaterial().setRollingResistance(0.08); + // Set the box color cone->setColor(mDemoColors[i % mNbDemoColors]); cone->setSleepingColor(mRedColorDemo); @@ -163,6 +169,9 @@ CollisionShapesScene::CollisionShapesScene(const std::string& name) Cylinder* cylinder = new Cylinder(CYLINDER_RADIUS, CYLINDER_HEIGHT, position , CYLINDER_MASS, mDynamicsWorld, meshFolderPath); + // Add some rolling resistance + cylinder->getRigidBody()->getMaterial().setRollingResistance(0.08); + // Set the box color cylinder->setColor(mDemoColors[i % mNbDemoColors]); cylinder->setSleepingColor(mRedColorDemo); @@ -188,6 +197,8 @@ CollisionShapesScene::CollisionShapesScene(const std::string& name) Capsule* capsule = new Capsule(CAPSULE_RADIUS, CAPSULE_HEIGHT, position , CAPSULE_MASS, mDynamicsWorld, meshFolderPath); + capsule->getRigidBody()->getMaterial().setRollingResistance(0.08); + // Set the box color capsule->setColor(mDemoColors[i % mNbDemoColors]); capsule->setSleepingColor(mRedColorDemo); @@ -540,7 +551,7 @@ void CollisionShapesScene::reset() { } // Create all the spheres of the scene - for (int i=0; i