Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9499


Ignore:
Timestamp:
Dec 10, 2012, 3:17:37 PM (12 years ago)
Author:
moralelastix
Message:

Praktisch fertig

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/turret/src/modules/objects/Turret.cc

    r9497 r9499  
    5757    void Turret::rotatePitch(const Vector2& value)
    5858    {
    59         /*this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8f);
    60         Pawn::rotatePitch(value);*/
    6159        orxout()<< "Turret rotate Pitch"<< endl;
     60
     61        const Quaternion& orient = this->getOrientation();
     62        Radian pitch = orient.getPitch();
     63
     64        if((value.x > 0 && pitch < Radian(180)) || (value.x < 0 && pitch > Radian(0)))
     65                SpaceShip::rotatePitch(value);
    6266    }
    6367
Note: See TracChangeset for help on using the changeset viewer.