Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Still not working.

File:
1 edited

Legend:

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

    r8907 r8910  
    6464
    6565  // put it back
    66   //   PRINTF(0)("putting it back to lastPos: \n");
    67   //   this->lastPositions[0].debug();
    68   //   PRINTF(0)("current pos:\n");
    69   //   collision->getEntityB()->getAbsCoor().debug();
     66     PRINTF(0)("putting it back to lastPos: \n");
     67     //this->lastPositions[0].debug();
     68      PRINTF(0)("current pos:\n");
     69     collision->getEntityB()->getAbsCoor().debug();
     70     
     71   
    7072
    7173  float height;
     
    8688  float CR_THRESHOLD = 0.2f;
    8789
    88 
     90  //height = collPos.y - box->halfLength[1];
     91  //PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
     92  // PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
     93  //
    8994
    9095  switch( ce->getType())
    9196  {
    92     case COLLISION_TYPE_AXIS_Y:
    93 
    94 //       height = collPos.y - box->halfLength[1];
    95 //       PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
    96 //       PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
    97 //
     97   
     98    case COLLISION_TYPE_AXIS_X:
     99      PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
     100      PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
     101      PRINTF(0)("COLLISION_TYPE_AXIS_X \n");
     102      break;
     103   case COLLISION_TYPE_AXIS_Y:
     104
     105      height = collPos.y - box->halfLength[1];
     106      PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
     107       PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
     108       PRINTF(0)("COLLISION_TYPE_AXIS_Y \n");
    98109//       // object is beneath the plane (ground)
    99110//       if( height <= 0.0f )
     
    107118//       }
    108119//       break;
    109 //
    110 
    111     case COLLISION_TYPE_AXIS_X:
     120     break;
     121
     122   
    112123    case COLLISION_TYPE_AXIS_Z:
    113       break;
     124      PRINTF(0)("height: %f          , model height: %f\n", height, box->halfLength[1]);
     125      PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z);
     126      PRINTF(0)("COLLISION_TYPE_AXIS_Z \n");
     127     break;
    114128
    115129    }
Note: See TracChangeset for help on using the changeset viewer.