Skip to content
Snippets Groups Projects
Commit deb50349 authored by Vanessa Karolek's avatar Vanessa Karolek
Browse files

[42][Fix] fix up and down movement

parent 2568c8c2
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
#include "vkcv/camera/PilotCameraController.hpp"
#include <iostream>
#include <GLFW/glfw3.h>
namespace vkcv {
......@@ -75,8 +74,8 @@ namespace vkcv {
position -= (m_cameraSpeed * front * static_cast<float> (m_backward) * static_cast<float>(deltaTime));
position += (glm::normalize(glm::cross(front, up)) * m_cameraSpeed * static_cast<float> (m_left) * static_cast<float>(deltaTime));
position -= (glm::normalize(glm::cross(front, up)) * m_cameraSpeed * static_cast<float> (m_right) * static_cast<float>(deltaTime));
position -= up * m_cameraSpeed * static_cast<float> (m_upward) * static_cast<float>(deltaTime);
position += up * m_cameraSpeed * static_cast<float> (m_downward) * static_cast<float>(deltaTime);
position += up * m_cameraSpeed * static_cast<float> (m_upward) * static_cast<float>(deltaTime);
position -= up * m_cameraSpeed * static_cast<float> (m_downward) * static_cast<float>(deltaTime);
camera.setPosition(position);
return position;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment