Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 18, 2007, 6:02:47 PM (17 years ago)
Author:
nicolasc
Message:

crosshair moves, shot do too, but not exactly where they should

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/rf_cannon.cc

    r10715 r10719  
    135135  pj->setParent(PNode::getNullParent());
    136136
    137   pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190);
     137//   pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190);
     138  Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor();
     139
     140  pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(tmp.getNormalized())*190);
    138141
    139142  pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor());
    140   pj->setAbsDir(this->getAbsDir());
    141 //   pj->setAbsDir(Quaternion(0, dynamic_cast<WeaponManager*>(this->getParent())->getFixedTarget()->getAbsCoor() - this->getParent()->getAbsCoor()));
    142 //   pj->setAbsDir(dynamic_cast<WeaponManager*>(this->getParent())->getFixedTarget()->getAbsDir());
     143//   pj->setAbsDir(this->getAbsDir());
     144
    143145  pj->activate();
    144146
Note: See TracChangeset for help on using the changeset viewer.