I have a question about friction in Bullet.
My setup is the following: There is a static plane (imagine a completely flat terrain) and some boxes drop down and collide with each other and the plane.
Now, even though I set both the rigid body of the plane and those of the boxes to have ridiculously high friction (20.0+, assuming that something between 0 and 1 would be normal), the boxes slide and slide as if they were on ice. They do stop after a time, but it seems to have nothing to do with the friction I set up.
Here is how I setup the plane:
Code: Select all
mPlaneShape = new btStaticPlaneShape(BulletMath::convert(normal), d);
btVector3 inertia;
mPlaneShape->calculateLocalInertia(0.0, inertia);
mPlaneActor = new btRigidBody(0.0, 0, mPlaneShape, inertia);
mPlaneActor->setFriction(20.3f);
mPlaneActor->setRollingFriction(20.3f);
Code: Select all
btRigidBody* rigidBody = new btRigidBody(mass, motionState, shape, inertia);
rigidBody->setFriction(200.3f);
rigidBody->setRollingFriction(200.3f);
What am I doing wrong here?
Mass question:
No matter what I set for the mass, the objects do not behave differently, a multiple ton object bouncing around like a plush toy. Is there something else to do for mass to be applied? Or could this even be related to the first problem?