From 0d9da1cc2562a9a9a5a0a32c2e3cf343b1654b9c Mon Sep 17 00:00:00 2001 From: Migdyn Date: Fri, 28 Oct 2022 23:55:27 -0400 Subject: [PATCH] 1st stage of adding an FPS camera --- main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.cpp b/main.cpp index dddbc52..cdd5067 100644 --- a/main.cpp +++ b/main.cpp @@ -8,6 +8,7 @@ #include #include #include +#include NodeRenderer renderer; //BlockManager blockManager; @@ -71,6 +72,9 @@ void display() glFlush(); glutSwapBuffers(); + sf::Vector2i lastMousePos = sf::Vector2i(0, 0); + sf::Vector2i mouseDelta = sf::Mouse::getPosition() - lastMousePos; + lastMousePos = sf::Mouse::getPosition(); glutPostRedisplay(); }