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-12-27 01:02:31 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-12-27 01:02:31 +0300
commit14d60ca000e11d0a3967ca25ba3b85072869d732 (patch)
tree9a7f39cdd9532d1a77b9d0b9df4d167a61996134 /source/gameengine/Physics
parent7b14c36a1800ade761b8c4b95691ead20748e3ad (diff)
-fixes in player: draw physics debugging, only render frames when actually updated, fix with hierarchies not properly build (causing crashes)
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index d3eb4db6f35..ecb6c8d9dcf 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -368,8 +368,14 @@ void CcdPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
if (m_body && m_body->getCollisionShape())
{
m_body->getCollisionShape()->setLocalScaling(m_cci.m_scaling);
- m_body->getCollisionShape()->calculateLocalInertia(m_cci.m_mass, m_cci.m_localInertiaTensor);
- m_body->setMassProps(m_cci.m_mass, m_cci.m_localInertiaTensor * m_cci.m_inertiaFactor);
+
+ //printf("no inertia recalc for fixed objects with mass=0\n");
+ if (m_cci.m_mass)
+ {
+ m_body->getCollisionShape()->calculateLocalInertia(m_cci.m_mass, m_cci.m_localInertiaTensor);
+ m_body->setMassProps(m_cci.m_mass, m_cci.m_localInertiaTensor * m_cci.m_inertiaFactor);
+ }
+
}
}
}