Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9096 in orxonox.OLD for branches/presentation


Ignore:
Timestamp:
Jul 4, 2006, 3:30:35 AM (18 years ago)
Author:
patrick
Message:

collision reaction works again

Location:
branches/presentation/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r9083 r9096  
    7070
    7171
    72   float CR_MAX_WALK_HEIGHT = 2.0f;
     72  float CR_MAX_WALK_HEIGHT = 10.0f;
    7373  float CR_THRESHOLD = 0.2f;
    7474
     
    7777  float side = 0;
    7878
    79   //PRINTF(0)("collision raction======================================\n");
    8079
    8180  const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents());
     
    117116
    118117        // object is beneath the plane (ground)
    119         if( front <= 0.0f )
     118        if( front <= 0.0f)
    120119        {
    121120          Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize();
    122           Vector backoff = dirX * front * -1.0f;
     121          Vector backoff = dirX * front;
    123122
    124123          entity->setAbsCoor(entity->getLastAbsCoor());
     
    134133
    135134        // collision in the y-axis
    136       case COLLISION_TYPE_AXIS_Y:
     135      case COLLISION_TYPE_AXIS_Y_NEG:
    137136        // calulate the height above ground
    138137        height = collPos.y - box->halfLength[1];
     
    141140        // object is beneath the plane (ground)
    142141//         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
    143         if( height < 0.0f )
     142        if( height < 0.0f /*&& height < -CR_MAX_WALK_HEIGHT*/)
    144143        {
    145144          entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
  • branches/presentation/src/lib/graphics/importer/bsp_manager.cc

    r9094 r9096  
    961961
    962962
    963 
     963  this->checkCollisionX(worldEntity);
     964  this->checkCollisionY(worldEntity);
     965  this->checkCollisionZ(worldEntity);
    964966
    965967
     
    12871289  if( box != NULL)
    12881290  {
    1289     up   = position +  box->center + dirY * (box->halfLength[1]  + BSP_Y_OFFSET);
     1291    up   = position +  box->center + dirY * (box->halfLength[1]/*  + BSP_Y_OFFSET*/);
    12901292    down = position +  box->center - dirY * (box->halfLength[1]  + BSP_Y_OFFSET);
    12911293  }
Note: See TracChangeset for help on using the changeset viewer.