mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-24 10:24:07 +02:00
Fix for mouse/touch look: don't apply rotations if the gyros/webcam aren't
connected.
This commit is contained in:
parent
483407a3f2
commit
686fc3607e
1 changed files with 3 additions and 0 deletions
|
@ -295,6 +295,9 @@ void Avatar::updateHeadFromGyrosAndOrWebcam() {
|
||||||
} else if (webcam->isActive()) {
|
} else if (webcam->isActive()) {
|
||||||
estimatedPosition = webcam->getEstimatedPosition();
|
estimatedPosition = webcam->getEstimatedPosition();
|
||||||
estimatedRotation = webcam->getEstimatedRotation();
|
estimatedRotation = webcam->getEstimatedRotation();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
_head.setPitch(estimatedRotation.x * AMPLIFY_PITCH);
|
_head.setPitch(estimatedRotation.x * AMPLIFY_PITCH);
|
||||||
_head.setYaw(estimatedRotation.y * AMPLIFY_YAW);
|
_head.setYaw(estimatedRotation.y * AMPLIFY_YAW);
|
||||||
|
|
Loading…
Reference in a new issue