diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-12 01:19:00 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-12 01:19:00 +0400 |
commit | 4bab327c1b16f9e27fe53935ea9d1d5dda6718d2 (patch) | |
tree | c6596493bcda28dc7d7edf31c572dff238ee9b96 | |
parent | 8f6a16c12ec0b1d8152d3c1fc9ae7f56d569837c (diff) |
fix BGE patch #7892: dRot motion is reversed on non-dynamic objects
Positive dRot motion actuator will now make the dynamic and non-dynamic objects rotate counter-clock wise.
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 7ffac9a82f1..347caa3f9e6 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -314,12 +314,13 @@ void KX_GameObject::ApplyMovement(const MT_Vector3& dloc,bool local) void KX_GameObject::ApplyRotation(const MT_Vector3& drot,bool local) { MT_Matrix3x3 rotmat(drot); - rotmat.transpose(); - - if (m_pPhysicsController1) // (IsDynamic()) - m_pPhysicsController1->RelativeRotate(rotmat,local); - // in worldspace + GetSGNode()->RelativeRotate(rotmat,local); + + if (m_pPhysicsController1) { // (IsDynamic()) + rotmat.transpose(); + m_pPhysicsController1->RelativeRotate(rotmat,local); + } } |