mirror of
https://github.com/overte-org/overte.git
synced 2025-08-14 13:36:25 +02:00
Bug fix for HMD roll causing avatar yaw when standing still
HMD roll should only cause the avatar to yaw when actively driving.
This commit is contained in:
parent
91ca38e016
commit
4d845bd208
1 changed files with 2 additions and 2 deletions
|
@ -1898,8 +1898,8 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
totalBodyYaw += (speedFactor * deltaAngle * (180.0f / PI));
|
||||
}
|
||||
|
||||
// Use head/HMD roll to turn while walking or flying.
|
||||
if (qApp->isHMDMode() && _hmdRollControlEnabled) {
|
||||
// Use head/HMD roll to turn while walking or flying, but not when standing still
|
||||
if (qApp->isHMDMode() && _hmdRollControlEnabled && hasDriveInput()) {
|
||||
// Turn with head roll.
|
||||
const float MIN_CONTROL_SPEED = 0.01f;
|
||||
float speed = glm::length(getVelocity());
|
||||
|
|
Loading…
Reference in a new issue