Fixed missing collisions in mansionl (caused by negative default mass

for objects). Added assert to bullet to catch this kind of problem early.
This commit is contained in:
hiker 2014-01-26 23:36:44 +11:00
parent 30011be115
commit 41a9b14859
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ void btRigidBody::setupRigidBody(const btRigidBody::btRigidBodyConstructionInfo&
setCollisionShape( constructionInfo.m_collisionShape );
m_debugBodyId = uniqueId++;
btAssert(constructionInfo.m_mass>=0);
setMassProps(constructionInfo.m_mass, constructionInfo.m_localInertia);
updateInertiaTensor();

View File

@ -91,7 +91,7 @@ void PhysicalObject::Settings::init()
m_body_type = PhysicalObject::MP_NONE;
m_crash_reset = false;
m_knock_kart = false;
m_mass = -1.0f;
m_mass = 0.0f;
m_radius = -1.0f;
m_reset_when_too_low = false;
m_flatten_kart = false;