Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3645 in orxonox.OLD for orxonox/trunk/src/camera.cc


Ignore:
Timestamp:
Mar 23, 2005, 3:51:56 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: temporaty path to the VIEW_TOP error mentioned by Patrick

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/camera.cc

    r3643 r3645  
    136136{
    137137  dt /= 500;
    138   this->fovy += (this->toFovy - this->fovy) * dt;
    139   Vector tmp = this->getRelCoor() + (this->toRelCoor - this->getRelCoor()) * dt;
    140   this->setRelCoor(&tmp);
     138  float tmpFovy = (this->toFovy - this->fovy) * dt;
     139  if (tmpFovy > .001)
     140    this->fovy += (this->toFovy - this->fovy) * dt;
     141  Vector tmpPos = (this->toRelCoor - this->getRelCoor()) * dt;
     142  if (tmpPos.len() >= .001)
     143    {
     144      tmpPos = tmpPos + this->getRelCoor();
     145      this->setRelCoor(&tmpPos);
     146    }
    141147}
    142148
Note: See TracChangeset for help on using the changeset viewer.