Changeset 8932 in orxonox.OLD for branches/single_player_map/src/lib/collision_reaction
- Timestamp:
- Jun 30, 2006, 12:46:36 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8931 r8932 98 98 front = collPos.x - box->halfLength[0]; 99 99 100 // PRINTF(0)("front: %f\n", front);101 // PRINTF(0)("in wall %i\n", ce->isInWall());102 103 100 // object is beneath the plane (ground) 104 101 if( front <= 0.0f ) 105 102 { 106 // entity->shiftCoor(Vector(front, 0.0f, 0.0f)); 103 Vector backoff = entity->getAbsDirX() * front; 104 entity->shiftCoor(backoff); 107 105 } 108 106 // object is already in the wall … … 119 117 height = collPos.y - box->halfLength[1]; 120 118 121 // PRINTF(0)("height: %f\n", height);122 // PRINTF(0)("in wall %i\n", ce->isInWall());123 119 124 120 // object is beneath the plane (ground) … … 130 126 else if( ce->isInWall()) 131 127 { 132 //entity->setAbsCoor(entity->getLastAbsCoor());128 entity->setAbsCoor(entity->getLastAbsCoor()); 133 129 } 134 130 break; … … 140 136 side = collPos.z - box->halfLength[2]; 141 137 142 // PRINTF(0)("side: %f\n", side);143 // PRINTF(0)("in wall %i\n", ce->isInWall());144 145 138 // object is beneath the plane (ground) 146 139 if( side <= 0.0f ) 147 140 { 148 // entity->shiftCoor(Vector(front, 0.0f, 0.0f));141 entity->shiftCoor(Vector(0.0f, 0.0f, side)); 149 142 } 150 143 // object is already in the wall
Note: See TracChangeset
for help on using the changeset viewer.