Changeset 9096 in orxonox.OLD for branches/presentation/src/lib/collision_reaction
- Timestamp:
- Jul 4, 2006, 3:30:35 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/collision_reaction/cr_physics_ground_walk.cc
r9083 r9096 70 70 71 71 72 float CR_MAX_WALK_HEIGHT = 2.0f;72 float CR_MAX_WALK_HEIGHT = 10.0f; 73 73 float CR_THRESHOLD = 0.2f; 74 74 … … 77 77 float side = 0; 78 78 79 //PRINTF(0)("collision raction======================================\n");80 79 81 80 const std::vector<CollisionEvent*>* collisionEvents = &(collision->getCollisionEvents()); … … 117 116 118 117 // object is beneath the plane (ground) 119 if( front <= 0.0f 118 if( front <= 0.0f) 120 119 { 121 120 Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize(); 122 Vector backoff = dirX * front * -1.0f;121 Vector backoff = dirX * front; 123 122 124 123 entity->setAbsCoor(entity->getLastAbsCoor()); … … 134 133 135 134 // collision in the y-axis 136 case COLLISION_TYPE_AXIS_Y :135 case COLLISION_TYPE_AXIS_Y_NEG: 137 136 // calulate the height above ground 138 137 height = collPos.y - box->halfLength[1]; … … 141 140 // object is beneath the plane (ground) 142 141 // 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*/) 144 143 { 145 144 entity->shiftCoor(Vector(0.0f, -height + 0.00001, 0.0f));
Note: See TracChangeset
for help on using the changeset viewer.