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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-04-24 01:48:17 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-24 01:48:17 +0400
commitf4cc03b0f1323fbf41730851716cb90e27e4c89e (patch)
tree2b6afcebd8dd79d1997f7a77606deb286471f826 /source/gameengine
parent408fcd6a33b1a2bd4c5314d54a7b10f881896cc3 (diff)
Better fix for BGE bug #7892: dRot is reversed on dynamic objects. Make sure that graphic, Bullet and Sumo(deprecated) objects rotate the same way. This fix reverses the rotation of non-dynamic objects compared to 2.45: you will need to change the sign of dRot in 2.45 games for them to work correctly in 2.46
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp1
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 1c508baca96..cf621e04f99 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -315,7 +315,6 @@ void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local)
GetSGNode()->RelativeRotate(rotmat,local);
if (m_pPhysicsController1) { // (IsDynamic())
- rotmat.transpose();
m_pPhysicsController1->RelativeRotate(rotmat,local);
}
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index fe9aa4419e4..d99b75482b9 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -290,9 +290,9 @@ void CcdPhysicsController::RelativeRotate(const float rotval[9],bool local)
m_body->setCollisionFlags(m_body->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
}
- btMatrix3x3 drotmat( rotval[0],rotval[1],rotval[2],
- rotval[4],rotval[5],rotval[6],
- rotval[8],rotval[9],rotval[10]);
+ btMatrix3x3 drotmat( rotval[0],rotval[4],rotval[8],
+ rotval[1],rotval[5],rotval[9],
+ rotval[2],rotval[6],rotval[10]);
btMatrix3x3 currentOrn;