improve rolling friction using anisotropic direction, to avoid resting in an instable position
(for implicit capsule, cylinder and cone shape) See Bullet/Demos/RollingFrictionDemo for an example
This commit is contained in:
@@ -281,8 +281,9 @@ void CcdPhysicsDemo::initPhysics()
|
||||
float mass = 1.f;
|
||||
|
||||
btRigidBody* body = localCreateRigidBody(mass,trans,shape);
|
||||
body->setAnisotropicFriction(shape->getAnisotropicRollingFrictionDirection(),btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
|
||||
|
||||
body->setRollingFriction(0.1);
|
||||
body->setRollingFriction(.3);
|
||||
///when using m_ccdMode
|
||||
if (m_ccdMode==USE_CCD)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user