Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2006, 11:33:10 PM (19 years ago)
Author:
patrick
Message:

branches: added new branche terrain copy of trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8524 r8693  
    5555  CollisionEvent* ce = collision->getCollisionEvents().front();
    5656  Vector normal = ce->getGroundNormal();
    57   // normal.normalize();
    5857
    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
    6659  Vector height = ce->getCollisionPosition() - collision->getEntityB()->getAbsCoor();
    6760  if(ce->getGroundNormal().len() <= 0.1f)
     
    7467    downspeed++;
    7568    collision->getEntityB()->setAbsCoor(collision->getEntityB()->getAbsCoor() + Vector(0.0,-0.03*downspeed,0.0));
    76    
     69
    7770  }
    7871  else
     
    8174    {
    8275      //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));
    8578    }
    8679      downspeed = 0;
    8780  }
    88  
     81
    8982
    9083  /*
     
    9386  collision->getEntityB()->setVelocity(Vector());
    9487  collision->getEntityB()->setAbsCoor(this->lastPositions[1]);
    95  
     88
    9689  */
    9790}
Note: See TracChangeset for help on using the changeset viewer.