Changeset 7930 for code/branches
- Timestamp:
- Feb 20, 2011, 3:28:18 PM (14 years ago)
- Location:
- code/branches/usability/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/src/orxonox/controllers/HumanController.cc
r7863 r7930 61 61 SetConsoleCommand("HumanController", "cycleNavigationFocus", &HumanController::cycleNavigationFocus).addShortcut(); 62 62 SetConsoleCommand("HumanController", "releaseNavigationFocus", &HumanController::releaseNavigationFocus).addShortcut(); 63 SetConsoleCommand("HumanController", "myposition", &HumanController::myposition ).addShortcut(); 63 64 64 65 CreateUnloadableFactory(HumanController); … … 200 201 void HumanController::toggleGodMode() 201 202 { 202 HumanController::getLocalControllerSingleton()->setGodMode( !HumanController::getLocalControllerSingleton()->getGodMode() ); 203 if (HumanController::localController_s) 204 HumanController::localController_s->setGodMode(!HumanController::localController_s->getGodMode()); 205 } 206 207 void HumanController::myposition() 208 { 209 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 210 { 211 const Vector3& position = HumanController::localController_s->controllableEntity_->getPosition(); 212 const Quaternion& orientation = HumanController::localController_s->controllableEntity_->getOrientation(); 213 214 COUT(0) << "position=\"" << position.x << ", " << position.y << ", " << position.z << "\" "; 215 COUT(0) << "orientation=\"" << orientation.w << ", " << orientation.x << ", " << orientation.y << ", " << orientation.z << "\"" << std::endl; 216 } 203 217 } 204 218 -
code/branches/usability/src/orxonox/controllers/HumanController.h
r7533 r7930 73 73 static void suicide(); 74 74 static void toggleGodMode(); 75 static void myposition(); 75 76 76 77 static void addBots(unsigned int amount);
Note: See TracChangeset
for help on using the changeset viewer.