Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9100 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 4:14:59 AM (18 years ago)
Author:
patrick
Message:

best cr ever. straifing in the wall works also

Location:
branches/presentation/src/lib
Files:
3 edited

Legend:

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

    r9099 r9100  
    104104          Vector backoff = dirX * front;
    105105
    106           entity->setAbsCoor(entity->getLastAbsCoor());
    107          // entity->shiftCoor(backoff);
     106          //entity->setAbsCoor(entity->getLastAbsCoor());
     107          entity->shiftCoor(backoff);
    108108        }
    109109        // object is already in the wall
     
    117117        back = collPos.len() - box->halfLength[0];
    118118
    119         PRINTF(0)("back: %f\n", back);
     119        PRINTF(0)("backward: back = %f\n", back);
     120
    120121        // object is beneath the plane (ground)
    121122        if( back <= 0.0f)
    122123        {
    123124          Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize();
    124           Vector backoff = dirX * front;
    125 
    126           entity->setAbsCoor(entity->getLastAbsCoor());
    127          // entity->shiftCoor(backoff);
    128         }
    129         // object is already in the wall
    130         else if( ce->isInWall())
    131         {
    132           entity->setAbsCoor(entity->getLastAbsCoor());
     125          Vector backoff = dirX * back * -1.0f;
     126
     127           //entity->setAbsCoor(entity->getLastAbsCoor());
     128           entity->shiftCoor(backoff);
     129        }
     130        // object is already in the wall
     131        else if( ce->isInWall())
     132        {
     133           entity->setAbsCoor(entity->getLastAbsCoor());
    133134        }
    134135        break;
     
    138139      case COLLISION_TYPE_AXIS_Y_NEG:
    139140        // calulate the height above ground
    140         height = collPos.y - box->halfLength[1];
     141        height = collPos.len() - box->halfLength[1];
    141142
    142143
  • branches/presentation/src/lib/graphics/importer/bsp_manager.cc

    r9096 r9100  
    12361236    testPlane = this->collPlane;
    12371237  }
    1238   if(this->outputAllSolid )
     1238  if( this->outputAllSolid)
    12391239  {
    12401240    this->collPlane = new plane;
  • branches/presentation/src/lib/graphics/importer/bsp_manager.h

    r9080 r9100  
    2828
    2929
    30 #define BSP_X_OFFSET 40.0f
     30#define BSP_X_OFFSET 20.0f
    3131#define BSP_Y_OFFSET 40.0f
    32 #define BSP_Z_OFFSET 40.0f
     32#define BSP_Z_OFFSET 20.0f
    3333
    3434
Note: See TracChangeset for help on using the changeset viewer.