Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5966 in orxonox.OLD


Ignore:
Timestamp:
Dec 7, 2005, 4:09:27 PM (18 years ago)
Author:
bknecht
Message:

spaceship: hovereffect implemented and minor changes

Location:
branches/spaceshipcontrol/src/world_entities/space_ships
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc

    r5964 r5966  
    119119  mouseSensitivity = 0.001;
    120120 
    121  
     121  cycle = 0.0;
    122122 
    123123
     
    264264void SpaceShip::tick (float time)
    265265{
     266     cycle += time;
    266267  // spaceship controlled movement
    267268  this->calculateVelocity(time);
     
    273274  // this is the air friction (necessary for a smooth control)
    274275  if(velocity.len() != 0) velocity -= velocity*0.01;
     276 
     277  this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
    275278 
    276279  //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h

    r5964 r5966  
    6161    float                 yMouse;             //!< mouse moved in y-Direction
    6262    float                 mouseSensitivity;   //!< the mouse sensitivity
     63    float                 cycle;              //!< hovercycle
    6364
    6465    Vector                velocity;           //!< the velocity of the player.
Note: See TracChangeset for help on using the changeset viewer.