diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-12-08 09:59:13 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-12-08 09:59:13 +0300 |
commit | 70df57df0f82be3966a09c8548bfde23fd5c17c4 (patch) | |
tree | 5890b57ae542903f097842c59ee317196cdca8f4 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | 2692dc55619905b504b7273ea9eaa9f7350acf9b (diff) |
BGE BugFix: [#24052] Can't change dynamic object's orientation using python (fix by Benoit)
from the tracker:
"""The required functionality is provided by the localOrientation property: setting this value will change the dynamic object orientation. This is because dynamic object have no parent and thus the local and world orientation are identical. However, setting worldOrientation will only change the scenegraph node, which has no effect as the physics controller will reset the orientation on next physics synchronization."""
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 1de7eee134e..7bd7fb8026f 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1022,7 +1022,7 @@ void KX_GameObject::NodeSetGlobalOrientation(const MT_Matrix3x3& rot) if (GetSGNode()->GetSGParent()) GetSGNode()->SetLocalOrientation(GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot); else - GetSGNode()->SetLocalOrientation(rot); + NodeSetLocalOrientation(rot); } void KX_GameObject::NodeSetLocalScale(const MT_Vector3& scale) |