[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19719] trunk/blender/source/gameengine/ Ketsji/KX_Scene.cpp: BGE bug #18522 fixed: Dupligroup offsets don' t work in BGE.

Benoit Bolsee benoit.bolsee at online.be
Tue Apr 14 22:54:04 CEST 2009


Revision: 19719
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19719
Author:   ben2610
Date:     2009-04-14 22:54:04 +0200 (Tue, 14 Apr 2009)

Log Message:
-----------
BGE bug #18522 fixed: Dupligroup offsets don't work in BGE.

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

Modified: trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2009-04-14 17:22:14 UTC (rev 19718)
+++ trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp	2009-04-14 20:54:04 UTC (rev 19719)
@@ -717,9 +717,9 @@
 
 		MT_Matrix3x3 newori = groupobj->NodeGetWorldOrientation() * gameobj->NodeGetWorldOrientation();
 		replica->NodeSetLocalOrientation(newori);
-
+		MT_Point3 offset(group->dupli_ofs);
 		MT_Point3 newpos = groupobj->NodeGetWorldPosition() + 
-			newscale*(groupobj->NodeGetWorldOrientation() * gameobj->NodeGetWorldPosition());
+			newscale*(groupobj->NodeGetWorldOrientation() * (gameobj->NodeGetWorldPosition()-offset));
 		replica->NodeSetLocalPosition(newpos);
 
 		replica->GetSGNode()->UpdateWorldData(0);





More information about the Bf-blender-cvs mailing list