diff options
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 79898cdc0d4..5d28bf47401 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -451,6 +451,11 @@ bool CcdPhysicsEnvironment::removeCcdPhysicsController(CcdPhysicsController* ctr } else { m_dynamicsWorld->removeCollisionObject(ctrl->GetCollisionObject()); + + if (ctrl->GetCharacterController()) + { + m_dynamicsWorld->removeAction(ctrl->GetCharacterController()); + } } } if (ctrl->m_registerCount != 0) |