Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8431


Ignore:
Timestamp:
May 9, 2011, 3:56:13 PM (14 years ago)
Author:
mastalde
Message:

added lift_ and stallSpeed_ for better flight behavior without errors…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8430 r8431  
    6666
    6767        this->lift_ = 0.2f;
    68         this->stallSpeed = 220.0f;
     68        this->stallSpeed_ = 220.0f;
    6969
    7070        this->bInvertYAxis_ = false;
     
    104104        XMLPortParamVariable(SpaceShip, "boostRate", boostRate_, xmlelement, mode);
    105105        XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode);
    106         XMLPortParamVariable(SpaceShip, "float", float_, xmlelement, mode);
     106        XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode);
    107107        XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode);
    108108    }
     
    175175            }
    176176       
    177 COUT(1) << "Vel:" << this-> getLocalVelocity().z * -1 << endl;
     177//COUT(1) << "Vel:" << this-> getLocalVelocity().z * -1 << endl;
    178178               
    179179        }
     
    226226       
    227227       
    228         if (abs(this-> getLocalVelocity().z) < stallSpeed)  {this->moveUpDown(float_*value*sqrt(abs(this-> getLocalVelocity().z)));}
     228        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_*value*sqrt(abs(this-> getLocalVelocity().z)));}
    229229
    230230       
Note: See TracChangeset for help on using the changeset viewer.