Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-04-22 01:33:03 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2009-04-22 01:33:03 +0400
commit221f589f519e9adff986281320ca681f0b1b2b7a (patch)
treef21166106de01931d371518bfd7aeff9b9e1bfd3 /source/gameengine/Ketsji/KX_Scene.cpp
parent094b3e81f68483aeca7c33875467c3f43dee0b0d (diff)
BGE bug #18521 fixed: Dupligroups + Bullet Softbodies are broken.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index f57a38d290d..6917305522e 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -717,12 +717,13 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
// set the replica's relative scale with the rootnode's scale
replica->NodeSetRelativeScale(newscale);
- 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()-offset));
replica->NodeSetLocalPosition(newpos);
+ // set the orientation after position for softbody!
+ MT_Matrix3x3 newori = groupobj->NodeGetWorldOrientation() * gameobj->NodeGetWorldOrientation();
+ replica->NodeSetLocalOrientation(newori);
replica->GetSGNode()->UpdateWorldData(0);
replica->GetSGNode()->SetBBox(gameobj->GetSGNode()->BBox());