[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33548] trunk/blender/source/gameengine/ Ketsji/KX_GameObject.cpp: BGE BugFix: [#24052] Can't change dynamic object' s orientation using python (fix by Benoit)

Dalai Felinto dfelinto at gmail.com
Wed Dec 8 07:59:26 CET 2010


Revision: 33548
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33548
Author:   dfelinto
Date:     2010-12-08 07:59:13 +0100 (Wed, 08 Dec 2010)

Log Message:
-----------
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."""

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2010-12-08 05:51:16 UTC (rev 33547)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp	2010-12-08 06:59:13 UTC (rev 33548)
@@ -1022,7 +1022,7 @@
 	if (GetSGNode()->GetSGParent())
 		GetSGNode()->SetLocalOrientation(GetSGNode()->GetSGParent()->GetWorldOrientation().inverse()*rot);
 	else
-		GetSGNode()->SetLocalOrientation(rot);
+		NodeSetLocalOrientation(rot);
 }
 
 void KX_GameObject::NodeSetLocalScale(const MT_Vector3& scale)





More information about the Bf-blender-cvs mailing list