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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-06-14 10:03:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-14 10:03:12 +0400
commite3fda550ba4aa784130d2e40ef3c6c9f262d1379 (patch)
tree863540120bd91105b91e921b474dd5b596b18f2b /source
parentbde991df9ed2d9a1bd54eecd09eb6a7ab0bea4fc (diff)
changing the scale of a sleeping object wasnt working with bullet.
Example is a cube that lands on a plane, sleeps after some time, a script changes the scale. It would still use the scale when the object first went to sleep. reported on blenderartist. http://blenderartists.org/forum/showthread.php?t=158617
Diffstat (limited to 'source')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index 3e20203a4cc..3c41a856660 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -979,6 +979,7 @@ void CcdPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
if (m_object && m_object->getCollisionShape())
{
+ m_object->activate(true); // without this, sleeping objects scale wont be applied in bullet if python changes the scale - Campbell.
m_object->getCollisionShape()->setLocalScaling(m_cci.m_scaling);
//printf("no inertia recalc for fixed objects with mass=0\n");