mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge fixes for brad, reversed pitch direction to correct mouse look
This commit is contained in:
parent
626dcd0875
commit
29c4374dc0
3 changed files with 7 additions and 8 deletions
|
@ -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.
|
||||
};
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue