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/nadion_laser.cc

    r10702 r10719  
    142142  pj->setParent(PNode::getNullParent());
    143143
    144   pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*160);
     144  Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor();
     145
     146  pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(tmp.getNormalized())*160);
    145147
    146148  pj->setAbsCoor(this->getEmissionPoint());
    147   pj->setAbsDir(this->getAbsDir());
     149//   pj->setAbsDir(this->getAbsDir());
    148150  pj->activate();
    149151
Note: See TracChangeset for help on using the changeset viewer.