Fix #2300 (mostly,karts get stuck there atm, but can't drive through the door).

This commit is contained in:
hiker 2015-09-25 09:15:47 +10:00
parent b7837fd05c
commit fc67252e78

View File

@ -496,6 +496,11 @@ void PhysicalObject::init()
btVector3 inertia(1,1,1); btVector3 inertia(1,1,1);
if (m_body_type != MP_EXACT) if (m_body_type != MP_EXACT)
m_shape->calculateLocalInertia(m_mass, inertia); m_shape->calculateLocalInertia(m_mass, inertia);
else
{
if (m_mass == 0)
inertia.setValue(0, 0, 0);
}
btRigidBody::btRigidBodyConstructionInfo info(m_mass, m_motion_state, btRigidBody::btRigidBodyConstructionInfo info(m_mass, m_motion_state,
m_shape, inertia); m_shape, inertia);