mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Bug fix for cocked head after playing an input recording.
I thought this was the cause of the Manuscript case 11454 but apparently not.
This commit is contained in:
parent
dd436229c1
commit
c5efcf5d6a
1 changed files with 5 additions and 2 deletions
|
@ -2019,8 +2019,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
_smoothOrientationTimer = 0.0f;
|
||||
}
|
||||
|
||||
getHead()->setBasePitch(getHead()->getBasePitch() + getDriveKey(PITCH) * _pitchSpeed * deltaTime);
|
||||
|
||||
Head* head = getHead();
|
||||
auto headPose = getControllerPoseInAvatarFrame(controller::Action::HEAD);
|
||||
if (headPose.isValid()) {
|
||||
glm::quat localOrientation = headPose.rotation * Quaternions::Y_180;
|
||||
|
@ -2032,6 +2031,10 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
head->setBaseYaw(YAW(euler));
|
||||
head->setBasePitch(PITCH(euler));
|
||||
head->setBaseRoll(ROLL(euler));
|
||||
} else {
|
||||
head->setBaseYaw(0.0f);
|
||||
head->setBasePitch(getHead()->getBasePitch() + getDriveKey(PITCH) * _pitchSpeed * deltaTime);
|
||||
head->setBaseRoll(0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue