BGE bug fix: set parent actuator change the orientation of object
authorBenoit Bolsee <benoit.bolsee@online.be>
Fri, 2 May 2008 17:22:28 +0000 (17:22 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Fri, 2 May 2008 17:22:28 +0000 (17:22 +0000)
source/gameengine/Ketsji/KX_GameObject.cpp

index 301a1413bcd68ab01fdeb1322f06eb6bd318ccc2..4c6ba448ebf8661bb9b469b4cc8d3892d71aaa1d 100644 (file)
@@ -229,7 +229,7 @@ void KX_GameObject::SetParent(KX_Scene *scene, KX_GameObject* obj)
 
                NodeSetLocalScale(scale1);
                NodeSetLocalPosition(MT_Point3(newpos[0],newpos[1],newpos[2]));
-               NodeSetLocalOrientation(NodeGetWorldOrientation()*invori);
+               NodeSetLocalOrientation(invori*NodeGetWorldOrientation());
                NodeUpdateGS(0.f,true);
                // object will now be a child, it must be removed from the parent list
                CListValue* rootlist = scene->GetRootParentList();