Changeset 8836 in orxonox.OLD for branches/single_player_map/src
- Timestamp:
- Jun 27, 2006, 5:08:43 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8834 r8836 66 66 // collision->getEntityB()->getAbsCoor().debug(); 67 67 68 Vectorheight;68 float height; 69 69 AABB* box = collision->getEntityB()->getModelAABB(); 70 WorldEntity* entity = collision->getEntityB(); 71 72 float CR_MAX_WALK_HEIGHT = 2.0f; 70 73 71 74 if( box != NULL) … … 73 76 74 77 Vector collPos = collision->getEntityB()->getAbsCoor() + box->center - ce->getCollisionPosition(); 75 PRINTF(0)("height: %f , model height: %f\n", collPos.y, box->halfLength[1]); 78 height = collPos.y - box->halfLength[1]; 79 80 PRINTF(0)("height: %f , model height: %f\n", height, box->halfLength[1]); 81 PRINTF(0)(" ground normal: %f, %f, %f\n", normal.x, normal.y, normal.z); 82 83 // object is beneath the plane (ground) 84 if( height < 0.0f) 85 { 86 entity->shiftCoor(Vector(0,-height,0)); 87 } 88 76 89 77 90 } 91 92 93 94 78 95 79 96 #if 0 … … 126 143 { 127 144 //if(downspeed <= 0) downspeed =1; 128 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0, -height.y + box->halfLength[1] + 2.0f /* 0.00001 *//*height.y+3.500005 + 10.0*/,0.0));145 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0, -height.y + box->halfLength[1] + 2.0f,0.0)); 129 146 //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0)); 130 147 downspeed = 0;
Note: See TracChangeset
for help on using the changeset viewer.