mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:36:47 +02:00
Fix case where Avatar could get stuck facing camera if rotating camera quickly and avatar faced backward.
This commit is contained in:
parent
8ccdfaf220
commit
19aacde3a2
1 changed files with 2 additions and 2 deletions
|
@ -3620,14 +3620,14 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight);
|
ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight);
|
||||||
}
|
}
|
||||||
if (frontBackDot < limitAngle) {
|
if (frontBackDot < limitAngle) {
|
||||||
_seatedBodyYawDelta = 0.0f;
|
|
||||||
|
|
||||||
if (!isRotatingWhileSeated) {
|
if (!isRotatingWhileSeated) {
|
||||||
if (frontBackDot < triggerAngle && isCameraYawing) {
|
if (frontBackDot < triggerAngle && _seatedBodyYawDelta == 0.0f) {
|
||||||
_shouldTurnToFaceCamera = true;
|
_shouldTurnToFaceCamera = true;
|
||||||
_firstPersonSteadyHeadTimer = 0.0f;
|
_firstPersonSteadyHeadTimer = 0.0f;
|
||||||
} else {
|
} else {
|
||||||
setWorldOrientation(previousOrientation);
|
setWorldOrientation(previousOrientation);
|
||||||
|
_seatedBodyYawDelta = 0.0f;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setWorldOrientation(previousOrientation);
|
setWorldOrientation(previousOrientation);
|
||||||
|
|
Loading…
Reference in a new issue