Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8863 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 28, 2006, 3:29:25 PM (18 years ago)
Author:
patrick
Message:

reverted the collision reaction

File:
1 edited

Legend:

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

    r8862 r8863  
    6666  //   collision->getEntityB()->getAbsCoor().debug();
    6767
    68   float height;
     68  Vector height;
    6969  AABB* box = collision->getEntityB()->getModelAABB();
    7070  WorldEntity* entity = collision->getEntityB();
     
    7373  float CR_THRESHOLD = 0.2f;
    7474
    75   if( box != NULL)
    76   {
    77 
    78     Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
    79     height = collPos.y - box->halfLength[1];
    80 
    81     PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
    82     PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
    83 
    84     // object is beneath the plane (ground)
    85     if( height < 0.0f )
    86     {
    87       entity->shiftCoor(Vector(0, -height, 0));
    88     }
    89     // object is already in the wall
    90     else if( ce->isInWall())
    91     {
    92 
    93     }
    94 
    95 
    96 
    97   }
     75//   if( box != NULL)
     76//   {
     77//
     78//     Vector collPos =  collision->getEntityB()->getAbsCoor()  + box->center - ce->getCollisionPosition();
     79//     height = collPos.y - box->halfLength[1];
     80//
     81//     PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
     82//     PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
     83//
     84//     // object is beneath the plane (ground)
     85//     if( height < 0.0f )
     86//     {
     87//       entity->shiftCoor(Vector(0, -height, 0));
     88//     }
     89//     // object is already in the wall
     90//     else if( ce->isInWall())
     91//     {
     92//
     93//     }
     94//
     95//
     96//
     97//   }
    9898
    9999
     
    101101
    102102
    103 #if 0
     103// #if 0
    104104  if( box != NULL)
    105105    height = ( ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() )*(-1.0f) ;
     
    158158
    159159  }// if(box!= NULL)
    160 #endif
     160// #endif
    161161  /*
    162162  PRINTF(0)("Collision with Ground: \n");
Note: See TracChangeset for help on using the changeset viewer.