diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2011-03-29 19:46:02 +0400 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2011-03-29 19:46:02 +0400 |
commit | c0ab420a73d51ff7f8fc2bb305128dfbb57ac487 (patch) | |
tree | 0c7100b39940fa5c82c276ebbed1fc2b115a9358 /source/gameengine | |
parent | e124c477135cb59daedcb1cfd0243ed1810b8f95 (diff) |
apply patch for body suspend/resume
See also issue #26614
http://projects.blender.org/tracker/index.php?func=detail&aid=26614&group_id=9&atid=306
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index f28ce953d0b..c87157ee993 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -470,8 +470,12 @@ void CcdPhysicsEnvironment::updateCcdPhysicsController(CcdPhysicsController* ctr if (newMass) body->getCollisionShape()->calculateLocalInertia(newMass, inertia); body->setMassProps(newMass, inertia); + m_dynamicsWorld->addRigidBody(body, newCollisionGroup, newCollisionMask); + } + else + { + m_dynamicsWorld->addCollisionObject(obj, newCollisionGroup, newCollisionMask); } - m_dynamicsWorld->addCollisionObject(obj, newCollisionGroup, newCollisionMask); } // to avoid nasty interaction, we must update the property of the controller as well ctrl->m_cci.m_mass = newMass; |