Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2006, 6:41:08 PM (18 years ago)
Author:
bottac
Message:

collision detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/world_entities/world_entity.cc

    r7230 r7833  
    275275
    276276/**
     277 *  this function is called, when two entities collide
     278 * @param entity: the world entity with whom it collides
     279 *
     280 * Implement behaviour like damage application or other miscellaneous collision stuff in this function
     281 */
     282void WorldEntity::collidesWithGround(const Vector& location)
     283{
     284  PRINTF(0)("BSP_GROUND: %s collides \n", this->getClassName() );
     285}
     286
     287void WorldEntity::collidesWithGround(const Vector& feet, const Vector& ray_1, const Vector& ray_2)
     288{
     289 
     290  PRINTF(0)("BSP_GROUND: Player collides \n", this->getClassName() );
     291  Vector v = this->getAbsDirX();
     292  v.x *= 10;
     293  v.y *= 10;
     294  v.z *= 10;
     295  this->setAbsCoor(ray_2 - v);
     296}
     297
     298/**
    277299 *  this is called immediately after the Entity has been constructed, initialized and then Spawned into the World
    278300 *
Note: See TracChangeset for help on using the changeset viewer.