diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-08-22 01:04:42 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-08-22 01:04:42 +0400 |
commit | 3d3527eb6dc44a386ed5ac486af3e087af3c7be0 (patch) | |
tree | 5b02f8efda9bedf65a63661092f2bce905fa4dee /source/gameengine/Ketsji | |
parent | 8551ac5e089ff224e49398ef15bf189c521d0dbb (diff) |
BGE bug #17411 fixed: the always sensor is called before the the scale of the object is applied. The scale is now applied to the shape before the creation of the rigid body.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index c95ab954022..d6997ee29a8 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -801,9 +801,6 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, } bm->setMargin(0.06); - if (objprop->m_dyna) - bm->calculateLocalInertia(ci.m_mass,ci.m_localInertiaTensor); - if (objprop->m_isCompoundChild) @@ -905,6 +902,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, ci.m_collisionFilterGroup = (isbulletdyna) ? short(CcdConstructionInfo::DefaultFilter) : short(CcdConstructionInfo::StaticFilter); ci.m_collisionFilterMask = (isbulletdyna) ? short(CcdConstructionInfo::AllFilter) : short(CcdConstructionInfo::AllFilter ^ CcdConstructionInfo::StaticFilter); ci.m_bRigid = objprop->m_dyna && objprop->m_angular_rigidbody; + MT_Vector3 scaling = gameobj->NodeGetWorldScaling(); + ci.m_scaling.setValue(scaling[0], scaling[1], scaling[2]); KX_BulletPhysicsController* physicscontroller = new KX_BulletPhysicsController(ci,isbulletdyna); // shapeInfo is reference counted, decrement now as we don't use it anymore if (shapeInfo) |