Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10189 in orxonox.OLD for branches/camera


Ignore:
Timestamp:
Jan 7, 2007, 11:59:49 PM (18 years ago)
Author:
gfilip
Message:

some bugs fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camera/src/world_entities/camera.cc

    r10131 r10189  
    355355void CameraTarget::translate(float speed, float dt)
    356356{
    357   if (fabs(translateTo.x -target->getAbsCoorX()) >= 0.01 || fabs(translateTo.y -target->getAbsCoorY()) >= 0.01 || fabs(translateTo.z -target->getAbsCoorZ()) >= 0.01 )
    358   {
    359     Vector tmpVec= iterate(dt,  &translateTo,  &(State::getCameraNode()->getAbsCoor()));
     357  if (fabs(translateTo.len()  - (target->getAbsCoor()).len()) >= 11 )
     358 {
     359
     360   Vector tmpVec= iterate(dt,  &translateTo,  &(State::getCameraNode()->getAbsCoor()));
    360361    glLoadIdentity();
    361     target->setAbsCoor(target->getAbsCoorX()+tmpVec.x, target->getAbsCoorY()+tmpVec.y, target->getAbsCoorZ()+tmpVec.z);
     362    target->shiftCoor(tmpVec.x, tmpVec.y, tmpVec.z);
     363    // cout << "%%" << tmpVec.x << "%%";
     364
    362365  }
    363366}
     
    370373void CameraTarget::jump(Vector* newPos)
    371374{
    372 
     375//target->setAbsCoor(newPos);
    373376}
    374377
Note: See TracChangeset for help on using the changeset viewer.