Change GUI pitch depending on its height relative to the user

This commit is contained in:
Guillaume Meunier
2025-11-02 17:51:59 +01:00
parent b9c1320823
commit dd874eea4b
2 changed files with 48 additions and 9 deletions
+9 -1
View File
@@ -18,6 +18,7 @@
#pragma once
#include <array>
#include <cstdint>
#include <glm/glm.hpp>
#include <imgui.h>
@@ -68,7 +69,14 @@ constexpr uint32_t pointer_color_border = 0xff000000;
namespace constants::lobby
{
// Position and orientation of the GUI layers
constexpr float gui_pitch = -0.2;
constexpr auto gui_pitches = std::to_array<std::pair<float, float>>({
{-90, -90},
{-50, -90},
{-30, -12},
{30, -12},
{50, 78},
{90, 78},
});
constexpr float keyboard_pitch = -0.6;
constexpr glm::vec3 popup_position = {0, 0, 0.05};
constexpr glm::vec3 keyboard_position = {0, -0.3, 0.1};