Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8545


Ignore:
Timestamp:
May 23, 2011, 4:12:44 PM (14 years ago)
Author:
mastalde
Message:

cleaded code and added some comments

Location:
code/branches/steering
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/data/levels/templates/spaceshipAssff.oxt

    r8430 r8545  
    1616   rotationThrust    = 60;
    1717
    18    lift = 0.2;
     18   lift = 1;
    1919   stallSpeed = 220;
    2020
  • code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8431 r8545  
    6565        this->bBoostCooldown_ = false;
    6666
    67         this->lift_ = 0.2f;
    68         this->stallSpeed_ = 220.0f;
     67        this->lift_ = 1.0f;                         // factor of the lift, standard is 1
     68        this->stallSpeed_ = 220.0f;                 // max speed where lift is added
    6969
    7070        this->bInvertYAxis_ = false;
     
    175175            }
    176176       
    177 //COUT(1) << "Vel:" << this-> getLocalVelocity().z * -1 << endl;
    178                
    179177        }
    180178    }
     
    224222        Pawn::rotatePitch(value);
    225223
    226        
    227        
    228         if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_*value*sqrt(abs(this-> getLocalVelocity().z)));}
    229 
    230        
     224
     225        //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
     226        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
     227
     228
    231229
    232230
     
    238236
    239237        Pawn::rotateRoll(value);
    240  
     238
    241239    }
    242240
Note: See TracChangeset for help on using the changeset viewer.