diff --git a/src/main.cpp b/src/main.cpp
index a837d39..a33160f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -158,6 +158,12 @@ private:
     vk::raii::DescriptorPool m_descriptorPool{ nullptr };
     std::vector<vk::raii::DescriptorSet> m_descriptorSets;
     vk::raii::DescriptorSet m_combinedDescriptorSet{ nullptr };
+    glm::vec3 m_cameraPos{ 2.0f, 2.0f, 2.0f };
+    glm::vec3 m_cameraUp{ 0.0f, 1.0f, 0.0f };
+    float m_pitch = -35.0f;
+    float m_yaw = -135.0f;
+    float m_cameraMoveSpeed = 1.0f;
+    float m_cameraRotateSpeed = 25.0f;
     /////////////////////////////////////////////////////////////
 
     /////////////////////////////////////////////////////////////
@@ -976,21 +982,71 @@ private:
             m_uniformBuffersMapped[i] = m_uniformBuffersMemory[i].mapMemory(0, bufferSize);
         }
     }
-    void updateUniformBuffer(const uint32_t currentImage) const {
+    void updateCamera() {
         static auto startTime = std::chrono::high_resolution_clock::now();
         const auto currentTime = std::chrono::high_resolution_clock::now();
         const float time = std::chrono::duration<float, std::chrono::seconds::period>(currentTime - startTime).count();
+        startTime = currentTime;
+
+        glm::vec3 front;
+        front.x = std::cos(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
+        front.y = 0.0f;
+        front.z = std::sin(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
+        front = glm::normalize(front);
+
+        if (glfwGetKey(m_window, GLFW_KEY_W) == GLFW_PRESS)
+            m_cameraPos += front * m_cameraMoveSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_S) == GLFW_PRESS)
+            m_cameraPos -= front * m_cameraMoveSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_A) == GLFW_PRESS)
+            m_cameraPos -= glm::normalize(glm::cross(front, m_cameraUp)) * m_cameraMoveSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_D) == GLFW_PRESS)
+            m_cameraPos += glm::normalize(glm::cross(front, m_cameraUp)) * m_cameraMoveSpeed * time;
+
+        if (glfwGetKey(m_window, GLFW_KEY_SPACE) == GLFW_PRESS)
+            m_cameraPos += m_cameraUp * m_cameraMoveSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS)
+            m_cameraPos -= m_cameraUp *m_cameraMoveSpeed * time;
+
+        if (glfwGetKey(m_window, GLFW_KEY_UP) == GLFW_PRESS)
+            m_pitch += m_cameraRotateSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_DOWN) == GLFW_PRESS)
+            m_pitch -= m_cameraRotateSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_LEFT) == GLFW_PRESS)
+            m_yaw   -= m_cameraRotateSpeed * time;
+        if (glfwGetKey(m_window, GLFW_KEY_RIGHT) == GLFW_PRESS)
+            m_yaw   += m_cameraRotateSpeed * time;
+
+        if (m_yaw < 0.0f) m_yaw += 360.0f;
+        m_yaw = std::fmodf(m_yaw + 180.0f, 360.0f);
+        m_yaw -= 180.0f;
+
+        if (m_pitch > 89.0f) m_pitch = 89.0f;
+        if (m_pitch < -89.0f) m_pitch = -89.0f;
+    }
+    void updateUniformBuffer(const uint32_t currentImage) {
+        updateCamera();
+        glm::vec3 front;
+        front.x = std::cos(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
+        front.y = std::sin(glm::radians(m_pitch));
+        front.z = std::sin(glm::radians(m_yaw)) * std::cos(glm::radians(m_pitch));
+        front = glm::normalize(front);
 
         UniformBufferObject ubo{};
         ubo.model = glm::rotate(
             glm::mat4(1.0f),
-            time * glm::radians(90.0f),
+            glm::radians(-90.0f),
+            glm::vec3(1.0f, 0.0f, 0.0f)
+        );
+        ubo.model *= glm::rotate(
+            glm::mat4(1.0f),
+            glm::radians(-90.0f),
             glm::vec3(0.0f, 0.0f, 1.0f)
         );
         ubo.view = glm::lookAt(
-            glm::vec3(2.0f, 2.0f, 2.0f),
-            glm::vec3(0.0f, 0.0f, 0.0f),
-            glm::vec3(0.0f, 0.0f, 1.0f)
+            m_cameraPos,
+            m_cameraPos + front,
+            m_cameraUp
         );
         ubo.proj = glm::perspective(
             glm::radians(45.0f),
