From 96bf3c651d48c2368d21537f9c94b71a885c74dd Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Tue, 3 Oct 2023 15:30:22 +0200 Subject: [PATCH] player debug variables updated in main --- include/camera.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/camera.hpp b/include/camera.hpp index 3905f2f..4546a5f 100644 --- a/include/camera.hpp +++ b/include/camera.hpp @@ -8,6 +8,9 @@ #include +#include "chunk.hpp" +#include "debugwindow.hpp" + class Camera { @@ -52,6 +55,16 @@ public: cameraFront = glm::normalize(direction); view = glm::lookAt(cameraPos, cameraPos + cameraFront, cameraUp); + + debug::window::set_parameter("px", cameraPos.x); + debug::window::set_parameter("py", cameraPos.y); + debug::window::set_parameter("pz", cameraPos.z); + debug::window::set_parameter("cx", (int)(cameraPos.x / CHUNK_SIZE)); + debug::window::set_parameter("cy", (int)(cameraPos.y / CHUNK_SIZE)); + debug::window::set_parameter("cz", (int)(cameraPos.z / CHUNK_SIZE)); + debug::window::set_parameter("lx", cameraFront.x); + debug::window::set_parameter("ly", cameraFront.y); + debug::window::set_parameter("lz", cameraFront.z); } void viewPortCallBack(GLFWwindow *window, int width, int height)