Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5908 in orxonox.OLD for branches/spaceshipcontrol/src


Ignore:
Timestamp:
Dec 4, 2005, 12:02:26 AM (19 years ago)
Author:
snellen
Message:

space_ship.cc updated

File:
1 edited

Legend:

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

    r5907 r5908  
    286286   //orthDirection = orthDirection.cross (direction);
    287287   Vector upDirection (0.0, 1.0, 0.0); //z
    288    
     288
    289289
    290290
     
    292292  if( this->bUp )
    293293   {
    294       if(travelSpeed <= 5000)  travelSpeed += 10;
     294     accel += (this->getAbsDirV()).getNormalized();
     295      //if(travelSpeed <= 5000)  travelSpeed += 10;
    295296   }
    296297
    297298  if( this->bDown )
    298    { 
    299      if(travelSpeed >= 10) travelSpeed -= 10;
     299   {
     300     accel -=  (this->getAbsDirV()).getNormalized();
     301     //if(travelSpeed >= 10) travelSpeed -= 10;
    300302   }
    301303
    302304  if( this->bLeft /* > -this->getRelCoor().z*2*/)
    303305  {
    304     velocityDir -= rightDirection;
    305     velocityDir.normalize();
     306    accel -= rightDirection;
     307    //velocityDir.normalize();
    306308    //rot +=Vector(1,0,0);
    307309    //rotVal -= .4;
     
    309311  if( this->bRight /* > this->getRelCoor().z*2*/)
    310312  {
    311     velocityDir += rightDirection;
    312     velocityDir.normalize();
     313    accel += rightDirection;
     314    //velocityDir.normalize();
    313315    //rot += Vector(1,0,0);
    314316    //rotVal += .4;
     
    317319  {
    318320    accel += upDirection;
     321    //velocityDir.normalize();
    319322    //rot += Vector(0,0,1);
    320323    //rotVal += .4;
     
    323326  {
    324327    accel -= upDirection;
     328    //velocityDir.normalize();
    325329    //rot += Vector(0,0,1);
    326330    //rotVal -= .4;
    327331  }
    328332
    329   velocity = velocityDir*(time*travelSpeed);
     333  velocity += accel*(time);
    330334  //rot.normalize();
    331335  //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
Note: See TracChangeset for help on using the changeset viewer.