From fdbfa8e36f85eee051fc562f1a8588970257a20f Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 6 Oct 2022 02:48:43 +0200 Subject: Rotating camera with mouse --- src/Mouse.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Mouse.hpp (limited to 'src/Mouse.hpp') diff --git a/src/Mouse.hpp b/src/Mouse.hpp new file mode 100644 index 0000000..c546a7e --- /dev/null +++ b/src/Mouse.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include +#include "Math/Vector.hpp" +#include "Window.hpp" + +namespace MC { + +class Mouse { +public: + Mouse() = default; + + Vector<2> update(Window &window); +private: + bool m_first_event = true; + float m_last_x, m_last_y = 0.0f; +}; + +} \ No newline at end of file -- cgit 1.4.1