BGE fix [#21488] Pumpkin in Gamekit Tutorial flips upside down
authorDaniel Stokes <kupomail@gmail.com>
Wed, 24 Jul 2013 00:32:26 +0000 (00:32 +0000)
committerDaniel Stokes <kupomail@gmail.com>
Wed, 24 Jul 2013 00:32:26 +0000 (00:32 +0000)
A reference was being grabbed when a copy was wanted.

source/gameengine/Physics/Bullet/CcdPhysicsController.cpp

index 4350ba5d93dfbdaac0e235ca4b943496d2e78157..1a8fda0749a8cc626f61689d81c50b48ab0d4b1f 100644 (file)
@@ -1146,7 +1146,7 @@ void              CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
                        {
                                //workaround for incompatibility between 'DYNAMIC' game object, and angular factor
                                //a DYNAMIC object has some inconsistency: it has no angular effect due to collisions, but still has torque
-                               const btVector3& angFac = body->getAngularFactor();
+                               const btVector3 angFac = body->getAngularFactor();
                                btVector3 tmpFac(1,1,1);
                                body->setAngularFactor(tmpFac);
                                body->applyTorque(torque);