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:
authorCampbell Barton <ideasman42@gmail.com>2009-06-13 15:09:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-06-13 15:09:13 +0400
commiteed13b43b19c619ccdcda67b17c0da65ad44879c (patch)
treeaa759322ad2b18becaf237671dd71ffbda9c2076 /source/gameengine/Physics
parente10e1ac04e63ed04a5712e515ed28eb92a78fd62 (diff)
parent2f1e118c30946bd3117c59cd45f13d79e4b612ec (diff)
merged from trunk 20741:20848
* Missing changes to release/windows/installer * Sequencer fixes in source/blender/src/seqaudio.c dont apply to 2.5 * brechts fix for #18855 r20763 wasnt merged, does this apply to 2.5?
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index d22c09b4d3e..3e20203a4cc 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -1016,14 +1016,21 @@ void CcdPhysicsController::ApplyTorque(float torqueX,float torqueY,float torque
}
if (body)
{
- //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();
- btVector3 tmpFac(0,0,1);
- body->setAngularFactor(tmpFac);
- body->applyTorque(torque);
- body->setAngularFactor(angFac);
- }
+ if (m_cci.m_bRigid)
+ {
+ body->applyTorque(torque);
+ }
+ else
+ {
+ //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();
+ btVector3 tmpFac(0,0,1);
+ body->setAngularFactor(tmpFac);
+ body->applyTorque(torque);
+ body->setAngularFactor(angFac);
+ }
+ }
}
}