diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 3546ee1ecf..40f0456726 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -57,8 +57,6 @@ const glm::vec3 START_LOCATION(0.f, 0.f, 0.f); // Where one's own agent begin const int IDLE_SIMULATE_MSECS = 16; // How often should call simulate and other stuff // in the idle loop? (60 FPS is default) - -const bool DISPLAY_HEAD_MOUSE = true; // customized canvas that simply forwards requests/events to the singleton application class GLCanvas : public QGLWidget { @@ -319,12 +317,11 @@ void Application::paintGL() { } } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { _myCamera.setTargetPosition(_myAvatar.getHeadPosition()); - _myCamera.setTargetRotation(_myAvatar.getBodyYaw(), - 0.0f, - //-_myAvatar.getAbsoluteHeadPitch(), + _myCamera.setTargetRotation(_myAvatar.getAbsoluteHeadYaw(), + _myAvatar.getAbsoluteHeadPitch(), 0.0f); } - + // important... _myCamera.update( 1.f/_fps ); @@ -1203,6 +1200,8 @@ void Application::initMenu() { _gyroLook->setChecked(true); (_mouseLook = optionsMenu->addAction("Mouse Look"))->setCheckable(true); _mouseLook->setChecked(false); + (_showHeadMouse = optionsMenu->addAction("Head Mouse"))->setCheckable(true); + _showHeadMouse->setChecked(false); (_transmitterDrives = optionsMenu->addAction("Transmitter Drive"))->setCheckable(true); _transmitterDrives->setChecked(true); @@ -1747,7 +1746,7 @@ void Application::displayOverlay() { //noiseTest(_glWidget->width(), _glWidget->height()); - if (DISPLAY_HEAD_MOUSE && !_lookingInMirror->isChecked() && USING_INVENSENSE_MPU9150) { + if (_showHeadMouse->isChecked() && !_lookingInMirror->isChecked() && USING_INVENSENSE_MPU9150) { // Display small target box at center or head mouse target that can also be used to measure LOD glColor3f(1.0, 1.0, 1.0); glDisable(GL_LINE_SMOOTH); diff --git a/interface/src/Application.h b/interface/src/Application.h index 98a41e89c2..8ef63b5022 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -138,6 +138,7 @@ private: QAction* _lookingInMirror; // Are we currently rendering one's own head as if in mirror? QAction* _gyroLook; // Whether to allow the gyro data from head to move your view QAction* _mouseLook; // Whether the have the mouse near edge of screen move your view + QAction* _showHeadMouse; // Whether the have the mouse near edge of screen move your view QAction* _transmitterDrives; // Whether to have Transmitter data move/steer the Avatar QAction* _renderVoxels; // Whether to render voxels QAction* _renderVoxelTextures; // Whether to render noise textures on voxels