Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6559 in orxonox.OLD for branches/spaceshipcontrol


Ignore:
Timestamp:
Jan 18, 2006, 2:51:53 PM (19 years ago)
Author:
bknecht
Message:

Control: SpaceShip is not anymore as strong effected by gravity as before

File:
1 edited

Legend:

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

    r6551 r6559  
    130130  mouseSensitivity = 0.001;
    131131  airViscosity = 0.95;
    132   controlVelocityX = 5;
     132  controlVelocityX = 20;
    133133  controlVelocityY = 150;
    134134  shipInertia = 3.0             ;
     
    295295  // this is the air friction (necessary for a smooth control)
    296296  if(travelSpeed >= 120) velocity -= velocity.getNormalized()*travelSpeed*travelSpeed*0.0001;
    297   else velocity -= velocity.getNormalized()*travelSpeed*0.001;
     297  else if (travelSpeed <= 80) velocity -= velocity.getNormalized()*travelSpeed*0.001;
    298298 
    299299  //other physics (gravity)
    300   if((this->getAbsDirY()).y*travelSpeed < 120 && (this->getAbsDirY()).y>0)
    301   move += Vector(0,-1,0)*60*time + Vector(0,1,0)*(this->getAbsDirY()).y*travelSpeed/2*time;
    302   if((this->getAbsDirY()).y*travelSpeed < 120 && (this->getAbsDirY()).y<0)
    303   move += Vector(0,-1,0)*60*time - Vector(0,1,0)*(this->getAbsDirY()).y*travelSpeed/2*time;
     300  if(travelSpeed < 120)
     301  move += Vector(0,-1,0)*60*time + Vector(0,1,0)*travelSpeed/2*time;
    304302   
    305303  //hoover effect
Note: See TracChangeset for help on using the changeset viewer.