Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2011, 1:40:53 PM (13 years ago)
Author:
landauf
Message:

the "lift" which is applied to the spaceship when pitching is now also applied when yawing.
moving up/down or left/right is now again possible.

File:
1 edited

Legend:

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

    r8651 r8658  
    224224    {
    225225        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
    226         this->steering_.z = -value.x;
     226        this->steering_.z -= value.x;
    227227    }
    228228
     
    230230    {
    231231        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
    232         this->steering_.x = value.x;
     232        this->steering_.x += value.x;
    233233    }
    234234
     
    236236    {
    237237        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
    238         this->steering_.y = value.x;
     238        this->steering_.y += value.x;
    239239    }
    240240
     
    244244
    245245        Pawn::rotateYaw(value);
     246
     247                //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
     248        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveRightLeft(-lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
    246249    }
    247250
Note: See TracChangeset for help on using the changeset viewer.