Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8336 in orxonox.OLD


Ignore:
Timestamp:
Jun 13, 2006, 12:34:33 AM (18 years ago)
Author:
patrick
Message:

bsp: better collision ground reaction: now it jumps back. but there are still bugs and freezes

Location:
branches/bsp_model/src/lib
Files:
4 edited

Legend:

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

    r8323 r8336  
    196196  {
    197197    this->collisionReaction->update(this->owner);
     198    if( this->collisionList.size() > 0) PRINTF(0)("collision list: %i\n", this->collisionList.size());
    198199    return;
    199200  }
  • branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8334 r8336  
    5858
    5959  // put it back
    60   PRINTF(0)("putting it back to lastPos: \n");
    61   this->lastPosition.debug();
    62   PRINTF(0)("current pos:\n");
    63   collision->getEntityB()->getAbsCoor().debug();
     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();
    6464
    6565  collision->getEntityB()->setVelocity(Vector());
    66   collision->getEntityB()->setAbsCoor(this->lastPosition);
     66  collision->getEntityB()->setAbsCoor(this->lastPositions[9]);
    6767}
    6868
     
    7474void CRPhysicsGroundWalk::update(WorldEntity* owner)
    7575{
    76   this->afterLastPosition = this->lastPosition;
    77   this->lastPosition = owner->getAbsCoor();
     76//   this->afterLastPosition = this->lastPosition;
     77//   this->lastPosition = owner->getAbsCoor();
     78
     79  for( int i = 9; i > 0; i--)
     80    this->lastPositions[i] = this->lastPositions[i-1];
     81  this->lastPositions[0] = owner->getAbsCoor();
     82
    7883
    7984  this->lastDirection = owner->getAbsDir();
    80   PRINTF(0)("no collision: saving location: \n");
    81   this->lastPosition.debug();
     85//   this->lastPosition.debug();
    8286}
    8387
  • branches/bsp_model/src/lib/collision_reaction/cr_physics_ground_walk.h

    r8325 r8336  
    2727    Vector       afterLastPosition;           //!< vector for the after last
    2828    Quaternion   lastDirection;               //!< quat with the last valid direction
     29
     30    Vector       lastPositions[10];           //!< last 10 positions
    2931};
    3032
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc

    r8334 r8336  
    911911      if(this->outputAllSolid)
    912912      {
    913         PRINTF(0)("this output all solid\n");
    914913        this->collPlane = new plane;
    915914        this->collPlane->x = 1.0f;
Note: See TracChangeset for help on using the changeset viewer.