Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3632 in orxonox.OLD for orxonox/trunk/src/world_entities/test_gun.cc


Ignore:
Timestamp:
Mar 22, 2005, 12:36:39 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: bullets now tick() but they shoot all over the place… some problems with the gundirection calculation :)

File:
1 edited

Legend:

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

    r3631 r3632  
    8383{
    8484  printf("TestGun::fire() - firing weapon now ---------------------------\n");
    85   WorldEntity* pj = new Projectile();
    86   pj->setAbsCoor( &this->getAbsCoor());
    87   pj->setAbsDir( &this->getAbsDir());
     85  Projectile* pj = new Projectile();
     86  Vector* v = new Vector();
     87  *v = this->getAbsCoor();
     88  pj->setAbsCoor(v);
     89  Quaternion* q = new Quaternion();
     90  *q = this->getAbsDir();
     91  pj->setAbsDir(q);
     92
     93  pj->setFlightDirection(q);
     94
    8895  this->worldEntities->add(pj);
    8996}
Note: See TracChangeset for help on using the changeset viewer.