Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 16, 2005, 9:20:20 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: if a collision occures, the virtual WorldEntity::collidesWith(WorldEntity*, Vector) is called of both objects. the reaction to the collision has to be defined there. default reaction is still output into stdout console. There is now more information

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/world_entity.cc

    r5044 r5046  
    9797{}
    9898
    99 /**
    100  *  this function is called, when two entities collide
    101  * @param entity: the world entity with whom it collides
    102  *
    103  * Implement behaviour like damage application or other miscellaneous collision stuff in this function
    104 */
    105 void WorldEntity::collidesWith(WorldEntity* entity)
    106 {
    107   PRINTF(0)("COLLISION with a WorldEntity\n");
    108 }
    109 
    11099
    111100/**
     
    117106void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location)
    118107{
    119   PRINTF(0)("COLLISION with a WorldEntity\n");
     108  PRINTF(0)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
    120109}
    121110
Note: See TracChangeset for help on using the changeset viewer.