Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3757 in orxonox.OLD


Ignore:
Timestamp:
Apr 8, 2005, 1:01:24 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: weapon projectile now spawn at the right place

Location:
orxonox/trunk/src/world_entities
Files:
3 edited

Legend:

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

    r3755 r3757  
    5757void TestBullet::tick (float time)
    5858{
    59   Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.7);
     59  Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
    6060  this->shiftCoor(v);
    6161
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3755 r3757  
    4747  this->leftRight = leftRight;
    4848
     49  if( this->leftRight == 0)
     50    this->projOffset = new Vector(1.0, 0.0, -0.35);
     51  else if( this->leftRight == 1)
     52    this->projOffset = new Vector(1.0, 0.0, 0.5);
     53
    4954  this->animator = SimpleAnimation::getInstance();
    5055  this->dummy1 = new WorldEntity(); /* a world entity that is not drawed: use this for the weapon */
     
    117122  Projectile* pj = new TestBullet(this);
    118123
    119   pj->setAbsCoor(this->getAbsCoor());
     124  pj->setAbsCoor(this->getAbsCoor() + *this->projOffset);
    120125  pj->setAbsDir(this->getAbsDir());
    121126
  • orxonox/trunk/src/world_entities/test_gun.h

    r3755 r3757  
    5353 private:
    5454  SimpleAnimation* animator;
     55  Vector* projOffset;
    5556  WorldEntity* dummy1;
    5657  int leftRight;   // this will become an enum
Note: See TracChangeset for help on using the changeset viewer.