Changeset 7009 in orxonox.OLD for trunk/src/world_entities/camera.cc
- Timestamp:
- Feb 3, 2006, 12:14:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/camera.cc
r6999 r7009 145 145 void Camera::tick(float dt) 146 146 { 147 //update frustum plane 148 this->viewVector = this->getAbsCoor() - this->target->getAbsCoor(); 149 this->frustumPlane = Plane(this->viewVector, this->getAbsCoor() + Vector(-70.0,0.0,0.0)); 150 151 this->upVector = this->getAbsDirV(); 152 153 147 154 float tmpFovy = (this->toFovy - this->fovy) ; 148 155 if (tmpFovy > 0.01) … … 173 180 Vector cameraPosition = this->getAbsCoor(); 174 181 Vector targetPosition = this->target->getAbsCoor(); 175 Vector up = this->getAbsDirV();176 Vector delay = Vector(0, 0, 0);177 //if( currentMode != VIEW_FRONT) delay = (this->target->getVelocity()) / 25.0f;178 182 179 183 // Setting the Camera Eye, lookAt and up Vectors 180 gluLookAt(cameraPosition.x - delay.x, cameraPosition.y - delay.y, cameraPosition.z - delay.z,184 gluLookAt(cameraPosition.x, cameraPosition.y, cameraPosition.z, 181 185 targetPosition.x, targetPosition.y, targetPosition.z, 182 up.x, up.y, up.z);186 this->upVector.x, this->upVector.y, this->upVector.z); 183 187 184 188
Note: See TracChangeset
for help on using the changeset viewer.