Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8337 in orxonox.OLD


Ignore:
Timestamp:
Jun 13, 2006, 2:21:04 AM (18 years ago)
Author:
patrick
Message:

bsp: collision detection still not working perfectly

Location:
branches/bsp_model/src
Files:
3 edited

Legend:

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

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

    r8336 r8337  
    6464
    6565  collision->getEntityB()->setVelocity(Vector());
    66   collision->getEntityB()->setAbsCoor(this->lastPositions[9]);
     66  collision->getEntityB()->setAbsCoor(this->lastPositions[6]);
    6767}
    6868
     
    7474void CRPhysicsGroundWalk::update(WorldEntity* owner)
    7575{
    76 //   this->afterLastPosition = this->lastPosition;
    77 //   this->lastPosition = owner->getAbsCoor();
    78 
    79   for( int i = 9; i > 0; i--)
     76  for( int i = 9; i > 0; i--) {
    8077    this->lastPositions[i] = this->lastPositions[i-1];
     78//     PRINTF(0)("lastPosition[%i]: %f, %f, %f\n", i, lastPositions[i].x, lastPositions[i].y, lastPositions[i].z);
     79  }
    8180  this->lastPositions[0] = owner->getAbsCoor();
    82 
    83 
    84   this->lastDirection = owner->getAbsDir();
    85 //   this->lastPosition.debug();
    8681}
    8782
  • branches/bsp_model/src/story_entities/game_world.cc

    r8220 r8337  
    279279    /* process time */
    280280    this->tick ();
     281
    281282    /* collision detection */
    282283    this->collisionDetection ();
    283284    /* collision reaction */
    284285    this->collisionReaction ();
     286
    285287    /* update the state */
    286288    this->update ();
     289
    287290    /* check the game rules */
    288291    this->checkGameRules();
Note: See TracChangeset for help on using the changeset viewer.