Changeset 8693 in orxonox.OLD for branches/bsp_model/src/lib/collision_reaction
- Timestamp:
- Jun 21, 2006, 11:33:10 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc
r8524 r8693 55 55 CollisionEvent* ce = collision->getCollisionEvents().front(); 56 56 Vector normal = ce->getGroundNormal(); 57 // normal.normalize();58 57 59 // put it back 60 // PRINTF(0)("putting it back to lastPos: \n"); 61 // this->lastPositions[0].debug(); 62 // PRINTF(0)("current pos:\n"); 63 // collision->getEntityB()->getAbsCoor().debug(); 64 65 58 66 59 Vector height = ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor(); 67 60 if(ce->getGroundNormal().len() <= 0.1f) … … 74 67 downspeed++; 75 68 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,-0.03*downspeed,0.0)); 76 69 77 70 } 78 71 else … … 81 74 { 82 75 //if(downspeed <= 0) downspeed =1; 83 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,height.y+3.55,0.0)); 84 //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0)); 76 collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,height.y+3.55,0.0)); 77 //collision->getEntityB()->setVelocity(Vector(0.0,0.0,0.0)); 85 78 } 86 79 downspeed = 0; 87 80 } 88 81 89 82 90 83 /* … … 93 86 collision->getEntityB()->setVelocity(Vector()); 94 87 collision->getEntityB()->setAbsCoor(this->lastPositions[1]); 95 88 96 89 */ 97 90 }
Note: See TracChangeset
for help on using the changeset viewer.