PyAPI RNA/BGE
[blender.git] / source / gameengine / Ketsji / KX_GameObject.cpp
index a3b2ba79e11c0654238c97647e0e939328406f2c..577f767b47523e77d3e7307c9b3c6a9e955fbc4b 100644 (file)
@@ -1184,11 +1184,7 @@ CListValue* KX_GameObject::GetChildrenRecursive()
        return list;
 }
 
-
 #ifdef USE_MATHUTILS
-extern "C" {
-#include "../../blender/python/generic/Mathutils.h" /* so we can have mathutils callbacks */
-}
 
 /* These require an SGNode */
 #define MATHUTILS_VEC_CB_POS_LOCAL 1
@@ -1880,12 +1876,7 @@ int KX_GameObject::pyattr_set_worldOrientation(void *self_v, const KX_PYATTRIBUT
        if (!PyOrientationTo(value, rot, "gameOb.worldOrientation = sequence: KX_GameObject, "))
                return PY_SET_ATTR_FAIL;
 
-       if (self->GetSGNode() && self->GetSGNode()->GetSGParent()) {
-               self->NodeSetLocalOrientation(self->GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot);
-       }
-       else {
-               self->NodeSetLocalOrientation(rot);
-       }
+       self->NodeSetGlobalOrientation(rot);
        
        self->NodeUpdateGS(0.f);
        return PY_SET_ATTR_SUCCESS;