Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-05-19 01:32:03 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-05-19 01:32:03 +0400
commit2ac81cc7ad83135b00e2e44103f69515a751bafd (patch)
tree13136d2042dc17632c459f4c9334d23fe8f40f35 /source/gameengine/Physics
parent379f02f6e60d6592d7579e67a167026018dc27e1 (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.cpp6
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;