Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8932 in orxonox.OLD


Ignore:
Timestamp:
Jun 30, 2006, 12:46:36 AM (18 years ago)
Author:
patrick
Message:

working with directions

Location:
branches/single_player_map/src/lib
Files:
2 edited

Legend:

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

    r8931 r8932  
    9898        front = collPos.x - box->halfLength[0];
    9999
    100 //         PRINTF(0)("front: %f\n", front);
    101 //         PRINTF(0)("in wall %i\n", ce->isInWall());
    102 
    103100        // object is beneath the plane (ground)
    104101        if( front <= 0.0f )
    105102        {
    106 //           entity->shiftCoor(Vector(front, 0.0f, 0.0f));
     103          Vector backoff = entity->getAbsDirX() * front;
     104          entity->shiftCoor(backoff);
    107105        }
    108106        // object is already in the wall
     
    119117        height = collPos.y - box->halfLength[1];
    120118
    121 //         PRINTF(0)("height: %f\n", height);
    122 //         PRINTF(0)("in wall %i\n", ce->isInWall());
    123119
    124120        // object is beneath the plane (ground)
     
    130126        else if( ce->isInWall())
    131127        {
    132          // entity->setAbsCoor(entity->getLastAbsCoor());
     128          entity->setAbsCoor(entity->getLastAbsCoor());
    133129        }
    134130        break;
     
    140136        side = collPos.z - box->halfLength[2];
    141137
    142 //         PRINTF(0)("side: %f\n", side);
    143 //         PRINTF(0)("in wall %i\n", ce->isInWall());
    144 
    145138        // object is beneath the plane (ground)
    146139        if( side <= 0.0f )
    147140        {
    148 //           entity->shiftCoor(Vector(front, 0.0f, 0.0f));
     141          entity->shiftCoor(Vector(0.0f, 0.0f, side));
    149142        }
    150143        // object is already in the wall
  • branches/single_player_map/src/lib/graphics/importer/bsp_manager.cc

    r8930 r8932  
    989989    dest     = worldEntity->getAbsCoor() +  box->center - box->axis[1] * box->halfLength[1]  * 40.0f;
    990990
    991     position1 = worldEntity->getAbsCoor() +  box->center + box->axis[0] * box->halfLength[0] * 2.0f;
    992     dest1     = worldEntity->getAbsCoor() +  box->center - box->axis[0] * box->halfLength[0] * 2.0f;
     991    position1 = worldEntity->getAbsCoor() +  box->center + box->axis[0] * box->halfLength[0] * 10.0f;
     992    dest1     = worldEntity->getAbsCoor() +  box->center - box->axis[0] * box->halfLength[0] * 10.0f;
    993993
    994994
     
    10661066    }
    10671067    if(this->outputAllSolid ) {
    1068      
     1068
    10691069      this->collPlane = new plane;
    10701070      this->collPlane->x = 0.0f;
     
    11201120}
    11211121  if(xCollision) {
    1122     worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z),dest1 , SolidFlag);
     1122    worldEntity->registerCollision(COLLISION_TYPE_AXIS_Z , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z),dest1 , SolidFlag);
    11231123  }
    11241124  if(zCollision) {
    1125     worldEntity->registerCollision(COLLISION_TYPE_AXIS_Z , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), dest2 , SolidFlag);
     1125    worldEntity->registerCollision(COLLISION_TYPE_AXIS_X , this->parent, worldEntity, Vector(testPlane->x, testPlane->y, testPlane->z), dest2 , SolidFlag);
    11261126  }
    11271127
Note: See TracChangeset for help on using the changeset viewer.