Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8888 in orxonox.OLD


Ignore:
Timestamp:
Jun 28, 2006, 9:38:32 PM (18 years ago)
Author:
bottac
Message:

Not yet done. Still working on collision detection.

File:
1 edited

Legend:

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

    r8887 r8888  
    10621062  this->inputEnd =   dest1;
    10631063  this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
    1064   out.x = this->outputFraction;
     1064  out.x = dest1.x + (dest1.x -position1.x) * this->outputFraction;
    10651065  xCollision = true;
    10661066  //out.z = this->outputFraction;
     
    10771077  this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 );
    10781078  //out.x = this->outputFraction;
    1079   out.z = this->outputFraction;
     1079  out.z = out.z = dest2.z + (dest2.z -position2.z) * this->outputFraction;
    10801080  if(this->outputFraction != 1.0 )
    10811081    zCollision = true;
     
    10931093  {
    10941094    PRINTF(5)("We got a collision!! Are you sure: outputFraction = %f\n", this->outputFraction);
    1095     worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y, this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, false);
     1095    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Y || (xCollision ? COLLISION_TYPE_AXIS_X :0) | (zCollision ? COLLISION_TYPE_AXIS_Z :0), this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), out, SolidFlag);
    10961096  }
    10971097  else
Note: See TracChangeset for help on using the changeset viewer.