mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
fix rolling/spinning friction in raytest demo.
This commit is contained in:
parent
9bad64fed9
commit
d49e3d787a
@ -200,7 +200,6 @@ void RaytestDemo::initPhysics()
|
||||
btDefaultMotionState* myMotionState = new btDefaultMotionState(groundTransform);
|
||||
btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia);
|
||||
btRigidBody* body = new btRigidBody(rbInfo);
|
||||
body->setRollingFriction(1);
|
||||
body->setFriction(1);
|
||||
//add the body to the dynamics world
|
||||
m_dynamicsWorld->addRigidBody(body);
|
||||
@ -269,6 +268,7 @@ void RaytestDemo::initPhysics()
|
||||
rbInfo.m_startWorldTransform = startTransform;
|
||||
btRigidBody* body = new btRigidBody(rbInfo);
|
||||
body->setRollingFriction(0.03);
|
||||
body->setSpinningFriction(0.03);
|
||||
body->setFriction(1);
|
||||
body->setAnisotropicFriction(colShape->getAnisotropicRollingFrictionDirection(),btCollisionObject::CF_ANISOTROPIC_ROLLING_FRICTION);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user