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:
authorErwin Coumans <blender@erwincoumans.com>2006-06-22 05:10:50 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-06-22 05:10:50 +0400
commitcd5a7fbe84e0f75dbab446d9cdee7fcf4e705650 (patch)
tree8333b7fac76d8b1c6ffc985205880211cf5d8b11 /source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
parentc570e2dc0be8506bc21b7226023e079eca9bac02 (diff)
workaround for a irregularity/bug in physics system (happens very seldom, just 1 report so far, linear velocity/AABB becomes NaN)
Diffstat (limited to 'source/gameengine/Ketsji/KX_BulletPhysicsController.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
index c974b9b6828..49e0e7953cb 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
@@ -144,10 +144,12 @@ void KX_BulletPhysicsController::setRigidBody(bool rigid)
void KX_BulletPhysicsController::SuspendDynamics()
{
+ GetRigidBody()->SetActivationState(DISABLE_SIMULATION);
}
void KX_BulletPhysicsController::RestoreDynamics()
{
+ GetRigidBody()->SetActivationState(ACTIVE_TAG);
}
SG_Controller* KX_BulletPhysicsController::GetReplica(class SG_Node* destnode)