Changeset 6001 in orxonox.OLD for branches/spaceshipcontrol/src/world_entities
- Timestamp:
- Dec 9, 2005, 5:25:33 PM (19 years ago)
- Location:
- branches/spaceshipcontrol/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/spaceshipcontrol/src/world_entities/camera.cc
r5769 r6001 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 115 113 void Camera::setViewMode(ViewMode mode) 116 114 { 115 currentMode = mode; 117 116 switch (mode) 118 117 { … … 180 179 { 181 180 float tmpFovy = (this->toFovy - this->fovy) ; 182 if (tmpFovy > .01)181 if (tmpFovy > 0.01) 183 182 this->fovy += tmpFovy * fabsf(dt); 184 183 } … … 207 206 Vector targetPosition = this->target->getAbsCoor(); 208 207 Vector up = this->getAbsDirV(); 208 Vector delay = Vector(0,0,0); 209 if( currentMode != VIEW_FRONT) delay = (this->target->getAbsDirX() * this->target->getSpeed())/30; 209 210 210 211 // Setting the Camera Eye, lookAt and up Vectors 211 gluLookAt(cameraPosition.x , cameraPosition.y, cameraPosition.z,212 gluLookAt(cameraPosition.x - delay.x, cameraPosition.y - delay.y, cameraPosition.z - delay.z, 212 213 targetPosition.x, targetPosition.y, targetPosition.z, 213 214 up.x, up.y, up.z); -
branches/spaceshipcontrol/src/world_entities/camera.h
r5005 r6001 58 58 59 59 float toFovy; //!< The fovy-mode to iterate to. 60 ViewMode currentMode; //!< The ViewMode the camera is in 60 61 }; 61 62
Note: See TracChangeset
for help on using the changeset viewer.