mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #16513 from DouglasWilcox/Fix_seated_rotation_edge_case_bounce
Edge case fix for seated rotation - it would bounce forward if you let go of Q/E at exact right time.
This commit is contained in:
commit
37a46d91fa
1 changed files with 5 additions and 2 deletions
|
@ -3620,14 +3620,17 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight);
|
||||
}
|
||||
if (frontBackDot < limitAngle) {
|
||||
|
||||
if (!isRotatingWhileSeated) {
|
||||
if (frontBackDot < triggerAngle) {
|
||||
if (frontBackDot < triggerAngle && _seatedBodyYawDelta == 0.0f) {
|
||||
_shouldTurnToFaceCamera = true;
|
||||
_firstPersonSteadyHeadTimer = 0.0f;
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
}
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
}
|
||||
} else if (frontBackDot > glm::sin(glm::radians(reorientAngle))) {
|
||||
_shouldTurnToFaceCamera = false;
|
||||
|
|
Loading…
Reference in a new issue