diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-19 01:32:03 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-05-19 01:32:03 +0400 |
commit | 2ac81cc7ad83135b00e2e44103f69515a751bafd (patch) | |
tree | 13136d2042dc17632c459f4c9334d23fe8f40f35 /source/gameengine/Physics | |
parent | 379f02f6e60d6592d7579e67a167026018dc27e1 (diff) |
BGE soft body: give access to the soft body collision margin in the Advanced panel. By default the collision margin is set to 0.25, which causes the soft body to somewhat float above the ground. You can decrease this value to get more realistic collision. Note that the algorithm may become unstable with lower margin.
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index 7302c47f4bf..6b00011b693 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -296,7 +296,11 @@ void CcdPhysicsController::CreateRigidbody() } } - + if (m_cci.m_margin > 0.f) + { + psb->getCollisionShape()->setMargin(m_cci.m_margin); + psb->updateBounds(); + } m_object = psb; |