Changeset 10131 in orxonox.OLD for branches/camera
- Timestamp:
- Dec 20, 2006, 5:02:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camera/src/world_entities/camera.cc
r10128 r10131 23 23 #include "targets.h" 24 24 #include <iostream.h> 25 25 26 26 27 … … 354 355 void CameraTarget::translate(float speed, float dt) 355 356 { 356 if (translateTo.x >= 0.01+target->getAbsCoorX() || translateTo.y >= 0.01+target->getAbsCoorY() || translateTo.z 357 >= 0.01+target->getAbsCoorZ() || translateTo.x <= target->getAbsCoorX()-0.01 || translateTo.y <= target->getAbsCoorY()-0.01 || translateTo.z 358 <= target->getAbsCoorZ()-0.01) 357 if (fabs(translateTo.x -target->getAbsCoorX()) >= 0.01 || fabs(translateTo.y -target->getAbsCoorY()) >= 0.01 || fabs(translateTo.z -target->getAbsCoorZ()) >= 0.01 ) 359 358 { 360 359 Vector tmpVec= iterate(dt, &translateTo, &(State::getCameraNode()->getAbsCoor())); 361 360 glLoadIdentity(); 362 //glTranslatef(363 cout << tmpVec.x;364 361 target->setAbsCoor(target->getAbsCoorX()+tmpVec.x, target->getAbsCoorY()+tmpVec.y, target->getAbsCoorZ()+tmpVec.z); 365 362 }
Note: See TracChangeset
for help on using the changeset viewer.