mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +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()) {
|
||||
estimatedPosition = webcam->getEstimatedPosition();
|
||||
estimatedRotation = webcam->getEstimatedRotation();
|
||||
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
_head.setPitch(estimatedRotation.x * AMPLIFY_PITCH);
|
||||
_head.setYaw(estimatedRotation.y * AMPLIFY_YAW);
|
||||
|
|
Loading…
Reference in a new issue