Changeset 12340
- Timestamp:
- May 9, 2019, 9:43:02 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/OrxoBlox/OrxoBloxBall.cc
r12339 r12340 43 43 #include "sound/WorldSound.h" 44 44 #include "core/XMLPort.h" 45 46 #include "OrxoBloxStones.h" 45 47 46 48 namespace orxonox … … 277 279 278 280 Vector3 velocity = this->getVelocity(); 279 Vector3 myPosition= otherObject->getPosition();280 btVector3 positionOtherObject= contactPoint.getPositionWorldOnA();281 Vector3 positionOtherObject = otherObject->getPosition(); 282 btVector3 myPosition = contactPoint.getPositionWorldOnA(); 281 283 orxout() << "About to Bounce >D" << endl; 282 //if (positionOtherObject.y < 0) {283 //this.destroy()284 //}S285 //else {286 284 287 int distance_X = positionOtherObject.getX() - myPosition.x;288 int distance_Z = positionOtherObject.getZ() - myPosition.z;285 int distance_X = myPosition.getX() - positionOtherObject.x; 286 int distance_Z = myPosition.getZ() - positionOtherObject.z; 289 287 290 288 if (distance_X < 0) … … 321 319 bool result = MovableEntity::collidesAgainst(otherObject, ownCollisionShape, contactPoint); 322 320 Bounce(otherObject, ownCollisionShape, contactPoint); 321 OrxoBloxStones* stone = orxonox_cast<OrxoBloxStones*>(otherObject); 322 if(stone != nullptr) 323 { 324 delete stone; 325 } 323 326 return result; 324 327 }
Note: See TracChangeset
for help on using the changeset viewer.