Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11591


Ignore:
Timestamp:
Nov 27, 2017, 1:39:12 PM (6 years ago)
Author:
varxth
Message:

Fix in QBlock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBQBlock.cc

    r11416 r11591  
    3939#include "SOBMushroom.h"
    4040#include "SOBCoin.h"
     41#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
     42
    4143
    4244namespace orxonox
     
    6264        //If you hit the QBlock, the visibility of all attached objects get inverted! Pretty easy way to create changing blocks :)
    6365        float v_z = otherObject->getVelocity().z;
    64         if (!used_ && v_z > 50.0) {
     66        int collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
     67        orxout() << "Distanz in z: " << collDisZ_ << endl;
     68        if (!used_ && v_z > 50.0 && collDisZ_ > 0) {
    6569            used_ = true;
    6670
Note: See TracChangeset for help on using the changeset viewer.