diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-14 10:03:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-14 10:03:12 +0400 |
commit | e3fda550ba4aa784130d2e40ef3c6c9f262d1379 (patch) | |
tree | 863540120bd91105b91e921b474dd5b596b18f2b /source | |
parent | bde991df9ed2d9a1bd54eecd09eb6a7ab0bea4fc (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.cpp | 1 |
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"); |