Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6882 for code/branches/fps/src


Ignore:
Timestamp:
May 10, 2010, 4:14:28 PM (15 years ago)
Author:
edwind
Message:

commit by ed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc

    r6872 r6882  
    147147                this->yaw(Radian(this->yaw_ * this->getMouseLookSpeed()),WorldEntity::Parent);
    148148                //this->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
    149                 this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
     149                Radian pitch=this->cameraPositionRootNode_->getOrientation().getPitch();
     150                if( pitch<Radian(1.5707) && pitch>Radian(-1.5707) ) this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
     151                else if(pitch<Radian(-1.5707)){
     152                        if(this->pitch_>0.0) this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
     153                        else if(pitch<Radian(-1.571)) this->cameraPositionRootNode_->pitch(-pitch+Radian(-1.570796));
     154                }
     155                else if(pitch>Radian(1.5707)){
     156                        if(this->pitch_<0.0) this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed()));
     157                        else if(pitch>Radian(1.571)) this->cameraPositionRootNode_->pitch(-pitch+Radian(1.570796));
     158                }
     159                 
     160               
    150161 //               this->roll(Radian(this->roll_ * this->getMouseLookSpeed()));
    151162            }
Note: See TracChangeset for help on using the changeset viewer.