Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10618 in orxonox.OLD for trunk/src/lib/collision_reaction


Ignore:
Timestamp:
Apr 4, 2007, 12:13:53 PM (18 years ago)
Author:
bknecht
Message:

merged cleanup into trunk (only improvements)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1616OrxonoxPlayability.kdevses
        1717OrxonoxPlayability.kdevelop.pcs
         18orxonox.backtrace
         19orxonox.kdevses
         20orxonox.kdevelop.pcs
  • trunk/src/lib/collision_reaction

    • Property svn:ignore set to
      .deps
      *.a
      Makefile.in
      Makefile
  • trunk/src/lib/collision_reaction/cr_engine.h

    r10013 r10618  
    6262      CR_COLLISION_TYPE_AXIS_Z,            //!< collision on z axis
    6363      CR_COLLISION_TYPE_AXIS_Z_NEG,        //!< collision on negative z axis
     64      CR_COLLISION_TYPE_WAY,               //!< collision on the way from last to current position
    6465      CR_COLLISION_TYPE_OBB,               //!< object aligned bounding box collide
    6566
  • trunk/src/lib/collision_reaction/cr_physics_full_walk.cc

    r10013 r10618  
    163163
    164164
     165 case CoRe::CREngine::CR_COLLISION_TYPE_WAY:
     166          // calulate the height above ground
     167          height = collPos.len() - box->halfLength[1];
     168
     169
     170          // object is beneath the plane (ground)
     171          //         if(height >= 0.0f && height <= 0.0001f) break ;// Do nothing
     172          if( height < 0.0f  )
     173          {
     174            entity->shiftCoor(Vector(0.0f, -height + 0.5f, 0.0f));
     175            entity->setOnGround(true);
     176          }
     177          // object is already in the wall
     178          else if( ce->isInWall())
     179          {
     180            entity->setAbsCoor(entity->getLastAbsCoor());
     181            PRINTF(0)("ground collision: reset pos\n");
     182          }
     183          else
     184          {
     185            // entity is not on ground
     186            entity->setOnGround(false);
     187          }
     188          break;
     189
     190
    165191          /* collision in the Z-AXIS */
    166192        case CoRe::CREngine::CR_COLLISION_TYPE_AXIS_Z:
Note: See TracChangeset for help on using the changeset viewer.