implemented rolling friction, using a contact constraint. Useful to get rolling spheres to rest, even on a slightly sloped plane.
See http://www.youtube.com/watch?v=RV7sBAsKu4M and Bullet/Demos/RollingFrictionDemo Fixes in FractureDemo (mouse picking constraint needs to be removed, otherwise constraint solver crashes/asserts)
This commit is contained in:
@@ -101,7 +101,7 @@ void GyroscopicDemo::initPhysics()
|
||||
tr.setIdentity();
|
||||
tr.setOrigin(positions[i]);
|
||||
body->setCenterOfMassTransform(tr);
|
||||
body->setAngularVelocity(btVector3(0,0,1000));
|
||||
body->setAngularVelocity(btVector3(0,0,15));
|
||||
body->setLinearVelocity(btVector3(0,.2,0));
|
||||
body->setFriction(btSqrt(1));
|
||||
m_dynamicsWorld->addRigidBody(body);
|
||||
|
||||
Reference in New Issue
Block a user