Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6034 in orxonox.OLD for trunk/src/world_entities/camera.cc


Ignore:
Timestamp:
Dec 10, 2005, 11:41:18 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the spaceshipcontroll branche back to the trunk
merged with command
svn merge branche/spaceshipcontroll trunk -r5978:HEAD
confilcs:
space_ship.cc: favor of controll, but Draw from trunk
rest: space_ship.h and sound_engine. in favor of the spaceshipcontroll branche

File:
1 edited

Legend:

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

    r5769 r6034  
    1 
    2 
    31/*
    42   orxonox - the future of 3D-vertical-scrollers
     
    115113void Camera::setViewMode(ViewMode mode)
    116114{
     115  currentMode = mode;
    117116  switch (mode)
    118117    {
     
    180179{
    181180  float tmpFovy = (this->toFovy - this->fovy) ;
    182   if (tmpFovy > .01)
     181  if (tmpFovy > 0.01)
    183182    this->fovy += tmpFovy * fabsf(dt);
    184183}
     
    207206  Vector targetPosition = this->target->getAbsCoor();
    208207  Vector up = this->getAbsDirV();
     208  Vector delay = Vector(0,0,0);
     209  if( currentMode != VIEW_FRONT) delay = (this->target->getAbsDirX() * this->target->getSpeed())/30;
    209210
    210211  // 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,
    212213            targetPosition.x, targetPosition.y, targetPosition.z,
    213214            up.x, up.y, up.z);
Note: See TracChangeset for help on using the changeset viewer.