I'm probably going to sound really picky, but in btCylinderShape.cpp, the inertia is calculate using a box approximation:
Code: Select all
void btCylinderShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
{
//approximation of box shape, todo: implement cylinder shape inertia before people notice ;-)
btVector3 halfExtents = getHalfExtentsWithMargin();
btScalar lx=btScalar(2.)*(halfExtents.x());
btScalar ly=btScalar(2.)*(halfExtents.y());
btScalar lz=btScalar(2.)*(halfExtents.z());
inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
mass/(btScalar(12.0)) * (lx*lx + lz*lz),
mass/(btScalar(12.0)) * (lx*lx + ly*ly));
}
It seems an easy enough fix to get the correct inertia - http://en.wikipedia.org/wiki/List_of_mo ... ia_tensors