Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8912 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 29, 2006, 4:22:36 PM (18 years ago)
Author:
bottac
Message:

Collision detection working again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc

    r8910 r8912  
    974974  Vector dest = worldEntity->getAbsCoor() - upDir*40.0f; //
    975975  Vector dest1 = position + forwardDir*4.0f;
    976   Vector dest2 = position2 + forwardDir;
     976  Vector dest2 = position2 + forwardDir*4.0;
    977977  dest = position - Vector(0.0, 40.0,0.0);
    978978  Vector out = dest;
     
    10451045  }
    10461046
    1047   plane* testPlane = new plane;
    1048   testPlane->x =  this->collPlane->x;
    1049   testPlane->y = this->collPlane->y;
    1050   testPlane->z = this->collPlane->z;
    1051 
     1047  plane* testPlane = this->collPlane;
    10521048
    10531049  bool xCollision = false;
     
    10821078      this->inputStart =  position2;
    10831079      this->inputEnd =   dest2;
     1080     
    10841081      this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
    10851082      //out.x = this->outputFraction;
     
    11051102
    11061103  // Return the normal here: Normal's stored in this->collPlane;
    1107   if( collision) {
     1104/*  if( collision) {
    11081105    PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
    11091106    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
    1110   }
     1107} */
    11111108  if(xCollision) {
    11121109    worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
Note: See TracChangeset for help on using the changeset viewer.