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:
erwin.coumans
2012-09-16 17:01:25 +00:00
parent 26c713423f
commit 22fb7d5c1e
8 changed files with 120 additions and 43 deletions

View File

@@ -97,6 +97,13 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
return m_upAxis;
}
virtual btVector3 getAnisotropicRollingFrictionDirection() const
{
btVector3 aniDir(0,0,0);
aniDir[getUpAxis()]=1;
return aniDir;
}
virtual btScalar getRadius() const
{
return getHalfExtentsWithMargin().getX();