Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5414 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 21, 2005, 9:45:54 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new functionality in PNode and Element2D
they now support setAbsCoordSofy*
and setAbsDirSoft*

these functions are used in the new Turret, for smooth iteration, so it does not just snap to place

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/turret.cc

    r5357 r5414  
    127127    quat = Quaternion(direction, Vector(0,1,0)) * Quaternion ( -M_PI_2, Vector(0,1,0)) ;
    128128
    129   this->setAbsDir(quat);
     129  this->setAbsDirSoft(quat, 5);
    130130}
    131131
     
    140140  if (target != NULL)
    141141  {
    142     pj->setVelocity(this->getVelocity()+(target->getAbsCoor() - this->getAbsCoor())*.5);//this->getVelocity());
    143     pj->setAbsDir(this->getAbsDir());
     142    pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*100.0   /*target->getAbsCoor() - this->getAbsCoor()*/)*.5);//this->getVelocity());
    144143  }
    145144  else
Note: See TracChangeset for help on using the changeset viewer.