[Orxonox-commit 6970] r11591 - code/branches/SOBv2_HS17/src/modules/superorxobros

varxth at orxonox.net varxth at orxonox.net
Mon Nov 27 13:39:12 CET 2017


Author: varxth
Date: 2017-11-27 13:39:12 +0100 (Mon, 27 Nov 2017)
New Revision: 11591

Modified:
   code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc
Log:
Fix in QBlock

Modified: code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc
===================================================================
--- code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc	2017-11-27 12:21:57 UTC (rev 11590)
+++ code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc	2017-11-27 12:39:12 UTC (rev 11591)
@@ -38,7 +38,9 @@
 #include "SOB.h"
 #include "SOBMushroom.h"
 #include "SOBCoin.h"
+#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
 
+
 namespace orxonox
 {
     RegisterClass(SOBQBlock);
@@ -61,7 +63,9 @@
 
         //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
         float v_z = otherObject->getVelocity().z;
-        if (!used_ && v_z > 50.0) {
+        int collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
+        orxout() << "Distanz in z: " << collDisZ_ << endl;
+        if (!used_ && v_z > 50.0 && collDisZ_ > 0) {
             used_ = true;
 
             for (WorldEntity* object : this->getAttachedObjects())



More information about the Orxonox-commit mailing list