Changeset 9065 in orxonox.OLD for branches/presentation/src/lib/collision_reaction/cr_physics_ground_walk.cc
- Timestamp:
- Jul 3, 2006, 7:22:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/collision_reaction/cr_physics_ground_walk.cc
r9061 r9065 102 102 Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize(); 103 103 Vector backoff = dirX * front; 104 104 105 105 entity->setAbsCoor(entity->getLastAbsCoor()); 106 106 // entity->shiftCoor(backoff); … … 112 112 } 113 113 break; 114 114 115 115 case COLLISION_TYPE_AXIS_X_NEG: 116 116 front = collPos.len() - box->halfLength[0]; // should be [0] … … 121 121 Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize(); 122 122 Vector backoff = dirX * front * -1.0f; 123 123 124 124 entity->setAbsCoor(entity->getLastAbsCoor()); 125 125 // entity->shiftCoor(backoff); … … 134 134 135 135 // collision in the y-axis 136 case COLLISION_TYPE_AXIS_Y _NEG:136 case COLLISION_TYPE_AXIS_Y: 137 137 // calulate the height above ground 138 138 height = collPos.y - box->halfLength[1]; … … 179 179 } 180 180 break; 181 182 181 182 183 183 // collision in the z-axis 184 184 case COLLISION_TYPE_AXIS_Z_NEG: … … 189 189 if( side <= 0.0f ) 190 190 { 191 191 192 192 Vector dirZ = entity->getAbsDirZ(); dirZ.y = 0.0f; dirZ.normalize(); 193 193 Vector backoff = dirZ * side*-1.0f;
Note: See TracChangeset
for help on using the changeset viewer.