Changeset 7184 for code/trunk/src/orxonox/worldentities
- Timestamp:
- Aug 18, 2010, 9:46:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
r7183 r7184 171 171 172 172 Radian pitch = this->cameraPositionRootNode_->getOrientation().getPitch(); 173 if (pitch < Radian( 1.5707f) && pitch > Radian(-1.5707f))173 if (pitch < Radian(math::pi_2) && pitch > Radian(-math::pi_2)) 174 174 { 175 175 this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed())); 176 176 } 177 else if (pitch < Radian(- 1.5707f))177 else if (pitch < Radian(-math::pi_2)) 178 178 { 179 179 if (this->pitch_ > 0.0f) 180 180 this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed())); 181 else if (pitch < Radian(- 1.571f))182 this->cameraPositionRootNode_->pitch(-pitch + Radian(- 1.570796f));181 else if (pitch < Radian(-math::pi_2)) 182 this->cameraPositionRootNode_->pitch(-pitch + Radian(-math::pi_2)); 183 183 } 184 else if (pitch > Radian( 1.5707f))184 else if (pitch > Radian(math::pi_2)) 185 185 { 186 186 if (this->pitch_ < 0.0f) 187 187 this->cameraPositionRootNode_->pitch(Radian(this->pitch_ * this->getMouseLookSpeed())); 188 else if (pitch > Radian( 1.571f))189 this->cameraPositionRootNode_->pitch(-pitch + Radian( 1.570796f));188 else if (pitch > Radian(math::pi_2)) 189 this->cameraPositionRootNode_->pitch(-pitch + Radian(math::pi_2)); 190 190 } 191 191 this->weaponNode_->setOrientation(this->cameraPositionRootNode_->getOrientation());
Note: See TracChangeset
for help on using the changeset viewer.