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
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user