Changeset 7857 for code/trunk/src/orxonox
- Timestamp:
- Feb 11, 2011, 5:17:39 PM (14 years ago)
- Location:
- code/trunk/src/orxonox/worldentities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/ControllableEntity.cc
r7534 r7857 204 204 this->currentCameraPosition_ = 0; 205 205 } 206 207 // disable mouse look if the new camera position doesn't allow it 208 if (this->currentCameraPosition_ && !this->currentCameraPosition_->getAllowMouseLook() && this->bMouseLook_) 209 this->mouseLook(); 206 210 } 207 211 } … … 209 213 void ControllableEntity::mouseLook() 210 214 { 211 this->bMouseLook_ = !this->bMouseLook_; 212 213 if (!this->bMouseLook_) 214 this->cameraPositionRootNode_->setOrientation(Quaternion::IDENTITY); 215 if (this->getCamera()) 216 { 217 if (!this->bMouseLook_&& this->currentCameraPosition_->getDrag()) 218 this->getCamera()->setDrag(true); 219 else 220 this->getCamera()->setDrag(false); 215 // enable mouse look only if allowed - disabling it works always 216 if (this->currentCameraPosition_ && (this->currentCameraPosition_->getAllowMouseLook() || this->bMouseLook_)) 217 { 218 this->bMouseLook_ = !this->bMouseLook_; 219 220 if (!this->bMouseLook_) 221 this->cameraPositionRootNode_->setOrientation(Quaternion::IDENTITY); 222 if (this->getCamera()) 223 { 224 if (!this->bMouseLook_ && this->currentCameraPosition_->getDrag()) 225 this->getCamera()->setDrag(true); 226 else 227 this->getCamera()->setDrag(false); 228 } 221 229 } 222 230 } -
code/trunk/src/orxonox/worldentities/pawns/Spectator.h
r7163 r7857 56 56 virtual void fired(unsigned int firemode); 57 57 virtual void greet(); 58 virtual void mouseLook() {} 58 59 59 60 protected:
Note: See TracChangeset
for help on using the changeset viewer.