Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 3, 2006, 7:22:44 PM (18 years ago)
Author:
patrick
Message:

ground collision works again

File:
1 edited

Legend:

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

    r9061 r9065  
    102102          Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize();
    103103          Vector backoff = dirX * front;
    104          
     104
    105105          entity->setAbsCoor(entity->getLastAbsCoor());
    106106         // entity->shiftCoor(backoff);
     
    112112        }
    113113        break;
    114        
     114
    115115      case COLLISION_TYPE_AXIS_X_NEG:
    116116        front = collPos.len() - box->halfLength[0]; // should be [0]
     
    121121          Vector dirX = entity->getAbsDirX(); dirX.y = 0.0f; dirX.normalize();
    122122          Vector backoff = dirX * front * -1.0f;
    123          
     123
    124124          entity->setAbsCoor(entity->getLastAbsCoor());
    125125         // entity->shiftCoor(backoff);
     
    134134
    135135        // collision in the y-axis
    136       case COLLISION_TYPE_AXIS_Y_NEG:
     136      case COLLISION_TYPE_AXIS_Y:
    137137        // calulate the height above ground
    138138        height = collPos.y - box->halfLength[1];
     
    179179        }
    180180        break;
    181        
    182        
     181
     182
    183183         // collision in the z-axis
    184184      case COLLISION_TYPE_AXIS_Z_NEG:
     
    189189        if( side <= 0.0f )
    190190        {
    191          
     191
    192192          Vector dirZ = entity->getAbsDirZ(); dirZ.y = 0.0f; dirZ.normalize();
    193193          Vector backoff = dirZ * side*-1.0f;
Note: See TracChangeset for help on using the changeset viewer.