mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 04:03:59 +02:00
Compute when negative deltas
This commit is contained in:
parent
793b2917f6
commit
8af22f0c04
1 changed files with 2 additions and 2 deletions
|
@ -3420,12 +3420,12 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
_lookAtOffsetPitch = Quaternions::IDENTITY;
|
||||
} else {
|
||||
// Compute new look at vectors
|
||||
if (totalBodyYaw > 0.0f) {
|
||||
if (totalBodyYaw != 0.0f) {
|
||||
_lookAtOffsetYaw = _lookAtOffsetYaw * glm::quat(glm::radians(glm::vec3(0.0f, totalBodyYaw, 0.0f)));
|
||||
}
|
||||
float pitchIncrement = getDriveKey(PITCH) * _pitchSpeed * deltaTime
|
||||
+ getDriveKey(DELTA_PITCH) * _pitchSpeed / PITCH_SPEED_DEFAULT;
|
||||
if (pitchIncrement > 0.0f) {
|
||||
if (pitchIncrement != 0.0f) {
|
||||
glm::quat _previousLookAtOffsetPitch = _lookAtOffsetPitch;
|
||||
_lookAtOffsetPitch = _lookAtOffsetPitch * glm::quat(glm::radians(glm::vec3(pitchIncrement, 0.0f, 0.0f)));
|
||||
// Limit the camera horizontal pitch
|
||||
|
|
Loading…
Reference in a new issue