- Timestamp:
- Jun 28, 2006, 3:29:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8862 r8863 66 66 // collision->getEntityB()->getAbsCoor().debug(); 67 67 68 floatheight;68 Vector height; 69 69 AABB* box = collision->getEntityB()->getModelAABB(); 70 70 WorldEntity* entity = collision->getEntityB(); … … 73 73 float CR_THRESHOLD = 0.2f; 74 74 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 wall90 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 // } 98 98 99 99 … … 101 101 102 102 103 #if 0103 // #if 0 104 104 if( box != NULL) 105 105 height = ( ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor() )*(-1.0f) ; … … 158 158 159 159 }// if(box!= NULL) 160 #endif160 // #endif 161 161 /* 162 162 PRINTF(0)("Collision with Ground: \n");
Note: See TracChangeset
for help on using the changeset viewer.