Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6882


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

commit by ed

Location:
code/branches/fps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fps/data/levels/fps_test.oxw

    r6872 r6882  
    2121    <Light type=directional position="0,-100000,0" direction="0.02, -1, 0.05" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
    2222
    23   <StaticEntity position="0,-10000,0" direction="0,-1,2" collisionType=static mass=100000 friction=0.01 >
     23  <StaticEntity position="0,-10000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
    2424      <attached>
    2525        <Model position="0,0,0" mesh="cube.mesh" scale3D="10000,10000,1000" />
  • 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.