mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 19:12:15 +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);
|
||||
}
|
||||
if (frontBackDot < limitAngle) {
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
|
||||
if (!isRotatingWhileSeated) {
|
||||
if (frontBackDot < triggerAngle && isCameraYawing) {
|
||||
if (frontBackDot < triggerAngle && _seatedBodyYawDelta == 0.0f) {
|
||||
_shouldTurnToFaceCamera = true;
|
||||
_firstPersonSteadyHeadTimer = 0.0f;
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
}
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
|
|
Loading…
Reference in a new issue