Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 4, 2005, 9:45:45 PM (19 years ago)
Author:
bknecht
Message:

new control and a little bit physics in space_ship.cc for better freespace feeling

File:
1 edited

Legend:

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

    r5916 r5918  
    258258
    259259  //orient the spaceship model in the direction of movement.
     260 
     261  if(velocity.len() != 0) velocity -= velocity*0.0005;
    260262
    261263  this->shiftCoor (move);
     
    280282  if( this->bUp )
    281283   {
    282      this->shiftCoor(this->getAbsDirX());
    283       //if(travelSpeed <= 5000)  travelSpeed += 10;
     284     //this->shiftCoor(this->getAbsDirX());
     285      accel += this->getAbsDirX();
    284286   }
    285287
    286288  if( this->bDown )
    287289   {
    288      this->shiftCoor((this->getAbsDirX())*-1);
    289      //if(travelSpeed >= 10) travelSpeed -= 10;
     290     //this->shiftCoor((this->getAbsDirX())*-1);
     291     accel -= this->getAbsDirX();
    290292   }
    291293
     
    326328  }
    327329
    328   velocity += accel*(time);
     330  velocity += accel;
    329331  //rot.normalize();
    330332  //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
Note: See TracChangeset for help on using the changeset viewer.