diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-07-26 13:35:52 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-07-26 13:35:52 +0400 |
commit | 188da231921b028962d1afd49eebe8a9730344a0 (patch) | |
tree | 765721391b36688a3eec84e18ed1f3458c868c37 /source/gameengine/Physics | |
parent | 6b7d013d8d2a698336afb619af561430618cc541 (diff) |
Fix for [#32185] "Incorrect physics for LibLoaded dupligroups" reported by Daniel Stokes (Kupoman). I'm not sure if this is the "correct" fix, but it at least allows all physics objects to be evaluated at least once by the new environment. This allows the new environment to sync up physics shapes for static objects.
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index 0a105ee1c1a..497a337ac19 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -836,6 +836,11 @@ void CcdPhysicsController::SetPhysicsEnvironment(class PHY_IPhysicsEnvironment * if (m_cci.m_physicsEnv->removeCcdPhysicsController(this)) { physicsEnv->addCcdPhysicsController(this); + + // Set the object to be active so it can at least by evaluated once. + // This fixes issues with static objects not having their physics meshes + // in the right spot when lib loading. + this->GetCollisionObject()->setActivationState(ACTIVE_TAG); } m_cci.m_physicsEnv = physicsEnv; } |