Changeset 10189 in orxonox.OLD for branches/camera/src
- Timestamp:
- Jan 7, 2007, 11:59:49 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/camera.cc
r10131 r10189 355 355 void CameraTarget::translate(float speed, float dt) 356 356 { 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())); 360 361 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 362 365 } 363 366 } … … 370 373 void CameraTarget::jump(Vector* newPos) 371 374 { 372 375 //target->setAbsCoor(newPos); 373 376 } 374 377
Note: See TracChangeset
for help on using the changeset viewer.