fixing limit for overlay too far/close

This commit is contained in:
Wayne Chen 2018-12-09 07:49:48 -08:00
parent 9fd1b7fb2d
commit 7ab1d649f1

View file

@ -8687,7 +8687,7 @@ void Application::updateLoginDialogOverlayPosition() {
auto newOverlayPositionVec = (cameraPositionVec + offset) + (upVec * -0.1f);
auto newOverlayOrientation = glm::inverse(glm::quat_cast(glm::lookAt(newOverlayPositionVec, cameraPositionVec, upVec))) * Quaternions::Y_180;
bool overlayOutOfBounds = glm::distance(overlayPositionVec, cameraPositionVec) > 0.5f;
bool overlayOutOfBounds = glm::distance(overlayPositionVec, cameraPositionVec) > 1.0f;
if (pointAngle > LOOK_AWAY_THRESHOLD_ANGLE || overlayOutOfBounds) {
QVariantMap properties {