From 70df57df0f82be3966a09c8548bfde23fd5c17c4 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 8 Dec 2010 06:59:13 +0000 Subject: 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.""" --- source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/gameengine/Ketsji') 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) -- cgit v1.2.3