Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6001 in orxonox.OLD for branches/spaceshipcontrol


Ignore:
Timestamp:
Dec 9, 2005, 5:25:33 PM (19 years ago)
Author:
bknecht
Message:

changes on camera so it is now dynamic

Location:
branches/spaceshipcontrol/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/story_entities/world.cc

    r5899 r6001  
    412412  }
    413413
    414   this->music = NULL;//(OggPlayer*)ResourceManager::getInstance()->load("sound/00-luke_grey_-_hypermode.ogg", OGG, RP_LEVEL);
     414  this->music = NULL;
     415  //(OggPlayer*)ResourceManager::getInstance()->load("sound/00-luke_grey_-_hypermode.ogg", OGG, RP_LEVEL);
    415416  //music->playback();
    416417}
  • branches/spaceshipcontrol/src/world_entities/camera.cc

    r5769 r6001  
    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);
  • branches/spaceshipcontrol/src/world_entities/camera.h

    r5005 r6001  
    5858
    5959  float             toFovy;          //!< The fovy-mode to iterate to.
     60  ViewMode          currentMode;     //!< The ViewMode the camera is in
    6061};
    6162
Note: See TracChangeset for help on using the changeset viewer.