mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:28:46 +02:00
adding experimental play area position for overlay
This commit is contained in:
parent
fe0bbe19d7
commit
f4ae55d534
1 changed files with 7 additions and 1 deletions
|
@ -8519,13 +8519,19 @@ void Application::createLoginDialogOverlay() {
|
||||||
refOverlayVec = myAvatar->getHeadPosition();
|
refOverlayVec = myAvatar->getHeadPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto playArea = HMD->getPlayAreaRect().toRectF();
|
||||||
|
if (!(playArea.isEmpty())) {
|
||||||
|
refOverlayVec = glm::vec3(playArea.x() - 0.5f, playArea.y() - 0.5f, 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
Overlays& overlays = qApp->getOverlays();
|
Overlays& overlays = qApp->getOverlays();
|
||||||
// DEFAULT_DPI / tablet scale percentage
|
// DEFAULT_DPI / tablet scale percentage
|
||||||
float overlayDpi = 31.0f / (75.0f / 100.0f);
|
float overlayDpi = 31.0f / (75.0f / 100.0f);
|
||||||
QVariantMap overlayProperties {
|
QVariantMap overlayProperties {
|
||||||
{ "name", "LoginDialogOverlay" },
|
{ "name", "LoginDialogOverlay" },
|
||||||
{ "url", OVERLAY_LOGIN_DIALOG_URL },
|
{ "url", OVERLAY_LOGIN_DIALOG_URL },
|
||||||
{ "position", vec3toVariant(refOverlayVec - glm::vec3(0.0f, -0.1f, 1.0f)) },
|
//{ "position", vec3toVariant(refOverlayVec - glm::vec3(0.0f, -0.1f, 1.0f)) },
|
||||||
|
{ "position", vec3toVariant(refOverlayVec) },
|
||||||
{ "orientation", quatToVariant(myAvatar->getWorldOrientation()) },
|
{ "orientation", quatToVariant(myAvatar->getWorldOrientation()) },
|
||||||
{ "isSolid", true },
|
{ "isSolid", true },
|
||||||
{ "grabbable", false },
|
{ "grabbable", false },
|
||||||
|
|
Loading…
Reference in a new issue