From 29c4374dc0df2d3e2e80c282ca5b56ae3facd3da Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 5 Jun 2013 09:59:39 -0700 Subject: [PATCH] Merge fixes for brad, reversed pitch direction to correct mouse look --- interface/src/Application.h | 1 - interface/src/Avatar.cpp | 2 +- interface/src/SerialInterface.h | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/interface/src/Application.h b/interface/src/Application.h index 9d37925c05..5c987f0062 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -292,7 +292,6 @@ private: int _bytesPerSecond; int _bytesCount; - QSettings* _settings; // Contain Menu settings and Avatar data bool _autosave; // True if the autosave is on. }; diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index 49b83dd670..d8178ca643 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -353,7 +353,7 @@ void Avatar::updateFromMouse(int mouseX, int mouseY, int screenWidth, int scree if (fabs(mouseLocationY) > MOUSE_MOVE_RADIUS) { float mousePitchAdd = (fabs(mouseLocationY) - MOUSE_MOVE_RADIUS) / (0.5f - MOUSE_MOVE_RADIUS) * MOUSE_PITCH_SPEED; bool downPitching = (mouseLocationY > 0.f); - _head.setPitch(_head.getPitch() + (downPitching ? mousePitchAdd : -mousePitchAdd)); + _head.setPitch(_head.getPitch() + (downPitching ? -mousePitchAdd : mousePitchAdd)); } } diff --git a/interface/src/SerialInterface.h b/interface/src/SerialInterface.h index 50baf5e98f..3fc9ea920a 100644 --- a/interface/src/SerialInterface.h +++ b/interface/src/SerialInterface.h @@ -40,12 +40,12 @@ public: const float getLastPitchRate() const { return _lastRotationRates[0] - _averageRotationRates[0]; } const float getLastYawRate() const { return _lastRotationRates[1] - _averageRotationRates[1]; } const float getLastRollRate() const { return _lastRotationRates[2] - _averageRotationRates[2]; } - const glm::vec3 getLastRotationRates() const { return _lastRotationRates; }; - const glm::vec3 getEstimatedRotation() const { return _estimatedRotation; }; - const glm::vec3 getEstimatedPosition() const { return _estimatedPosition; }; - const glm::vec3 getEstimatedVelocity() const { return _estimatedVelocity; }; - const glm::vec3 getLastAcceleration() const { return _lastAcceleration; }; - const glm::vec3 getGravity() const { return _gravity; }; + const glm::vec3& getLastRotationRates() const { return _lastRotationRates; }; + const glm::vec3& getEstimatedRotation() const { return _estimatedRotation; }; + const glm::vec3& getEstimatedPosition() const { return _estimatedPosition; }; + const glm::vec3& getEstimatedVelocity() const { return _estimatedVelocity; }; + const glm::vec3& getLastAcceleration() const { return _lastAcceleration; }; + const glm::vec3& getGravity() const { return _gravity; }; void renderLevels(int width, int height); void resetAverages();