Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6030 in orxonox.OLD


Ignore:
Timestamp:
Dec 10, 2005, 10:54:34 PM (18 years ago)
Author:
snellen
Message:

space_ship.cc updated

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

    r6029 r6030  
    118118  xMouse = yMouse = 0;
    119119  mouseSensitivity = 0.001;
     120  airViscosity =0.5;
    120121
    121122  cycle = 0.0;
     
    270271  Vector move = (velocity)*time;
    271272
    272   //orient the spaceship model in the direction of movement.
     273  //orient the velocity in the direction of the spaceship.
    273274  travelSpeed = velocity.len();
    274   velocity += ((this->getAbsDirX())*travelSpeed-velocity);
     275  velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
    275276  velocity = (velocity.getNormalized())*travelSpeed;
    276277
  • branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h

    r5966 r6030  
    5757    bool                  bRollL;             //!< rolling button pressed (left)
    5858    bool                  bRollR;             //!< rolling button pressed (right)
    59    
     59
    6060    float                 xMouse;             //!< mouse moved in x-Direction
    6161    float                 yMouse;             //!< mouse moved in y-Direction
     
    6868    float                 acceleration;       //!< the acceleration of the player.
    6969
     70    float                 airViscosity;
     71
    7072};
    7173
Note: See TracChangeset for help on using the changeset viewer.