mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 21:52:11 +02:00
Clamp rotation velocity if hit trigger angle, but only bounce forward if cameraYaw is true.
This commit is contained in:
parent
0f428f0afb
commit
8ccdfaf220
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) {
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
|
||||
if (!isRotatingWhileSeated) {
|
||||
if (frontBackDot < triggerAngle) {
|
||||
if (frontBackDot < triggerAngle && isCameraYawing) {
|
||||
_shouldTurnToFaceCamera = true;
|
||||
_firstPersonSteadyHeadTimer = 0.0f;
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
}
|
||||
} else {
|
||||
setWorldOrientation(previousOrientation);
|
||||
_seatedBodyYawDelta = 0.0f;
|
||||
}
|
||||
} else if (frontBackDot > glm::sin(glm::radians(reorientAngle))) {
|
||||
_shouldTurnToFaceCamera = false;
|
||||
|
|
Loading…
Reference in a new issue