Changeset 6882
- Timestamp:
- May 10, 2010, 4:14:28 PM (15 years ago)
- Location:
- code/branches/fps
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/fps/data/levels/fps_test.oxw
r6872 r6882 21 21 <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" /> 22 22 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 > 24 24 <attached> 25 25 <Model position="0,0,0" mesh="cube.mesh" scale3D="10000,10000,1000" /> -
code/branches/fps/src/orxonox/worldentities/pawns/FpsPlayer.cc
r6872 r6882 147 147 this->yaw(Radian(this->yaw_ * this->getMouseLookSpeed()),WorldEntity::Parent); 148 148 //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 150 161 // this->roll(Radian(this->roll_ * this->getMouseLookSpeed())); 151 162 }
Note: See TracChangeset
for help on using the changeset viewer.