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-12 01:19:00 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-12 01:19:00 +0400
commit4bab327c1b16f9e27fe53935ea9d1d5dda6718d2 (patch)
treec6596493bcda28dc7d7edf31c572dff238ee9b96 /source/gameengine
parent8f6a16c12ec0b1d8152d3c1fc9ae7f56d569837c (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.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp11
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);
+ }
}