Fix for mouse/touch look: don't apply rotations if the gyros/webcam aren't

connected.
This commit is contained in:
Andrzej Kapolka 2013-06-21 14:25:25 -07:00
parent 483407a3f2
commit 686fc3607e

View file

@ -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);