Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

spaceship: hovereffect implemented and minor changes

File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.