Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5257 in orxonox.OLD for trunk/src/world_entities/npc.cc


Ignore:
Timestamp:
Sep 25, 2005, 7:04:28 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: bouncy effect with physically based animations… or something like it at least.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npc.cc

    r5087 r5257  
    4343  if (entity->isA(CL_PROJECTILE))
    4444    PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getName(), entity->getName(), location.x, location.y, location.z);
    45   this->setVisibiliy(false);
    46   State::getWorldEntityList()->remove(this);
     45  this->applyForce(Vector(0,0,0)-location*1000);
     46//  this->setVisibiliy(false);
     47//  State::getWorldEntityList()->remove(this);
    4748}
    4849
     
    5051void NPC::tick(float dt)
    5152{
    52   Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor());
     53//  Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor());
    5354
    5455  //if (directin.len() < 100)
    55   this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0));
     56//  this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0));
    5657  this->shiftDir(Quaternion(dt, this->randomRotAxis));
    5758
Note: See TracChangeset for help on using the changeset viewer.