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

[#42][Fix] correct standard up vector rotation

... because Vulkan is a bit different :D
parent 4d1a5c0d
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
Pipeline #25343 passed
...@@ -68,7 +68,7 @@ namespace vkcv { ...@@ -68,7 +68,7 @@ namespace vkcv {
} }
void TrackballCamera::updatePosition(double deltaTime) { void TrackballCamera::updatePosition(double deltaTime) {
glm::mat4 rotationY = glm::rotate(glm::mat4(1.0f), glm::radians(m_yaw), glm::vec3(0.0f, 1.0f, 0.0f)); glm::mat4 rotationY = glm::rotate(glm::mat4(1.0f), glm::radians(m_yaw), glm::vec3(0.0f, -1.0f, 0.0f));
glm::mat4 rotationX = glm::rotate(rotationY, glm::radians(m_pitch), glm::vec3(1.0f, 0.0f, 0.0f)); glm::mat4 rotationX = glm::rotate(rotationY, glm::radians(m_pitch), glm::vec3(1.0f, 0.0f, 0.0f));
glm::vec3 translate = glm::vec3(0.0f,0.0f,m_radius); glm::vec3 translate = glm::vec3(0.0f,0.0f,m_radius);
translate = glm::vec3(rotationX * glm::vec4(translate, 0.0f)); translate = glm::vec3(rotationX * glm::vec4(translate, 0.0f));
......
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