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

[#42] change pitch rotation direction when orbiting

parent 28ccc7b8
No related branches found
No related tags found
1 merge request!35Resolve "Kamera - Trackballkamera"
Pipeline #25726 failed
...@@ -57,7 +57,7 @@ namespace vkcv::camera { ...@@ -57,7 +57,7 @@ namespace vkcv::camera {
const glm::vec3 xAxis = glm::vec3(1.0f, 0.0f, 0.0f); const glm::vec3 xAxis = glm::vec3(1.0f, 0.0f, 0.0f);
const glm::mat4 rotationY = glm::rotate(glm::mat4(1.0f), glm::radians(yaw), yAxis); const glm::mat4 rotationY = glm::rotate(glm::mat4(1.0f), glm::radians(yaw), yAxis);
const glm::mat4 rotationX = glm::rotate(rotationY, glm::radians(pitch), xAxis); const glm::mat4 rotationX = glm::rotate(rotationY, -glm::radians(pitch), xAxis);
const glm::vec3 translation = glm::vec3( const glm::vec3 translation = glm::vec3(
rotationX * glm::vec4(0.0f, 0.0f, m_radius, 0.0f) rotationX * glm::vec4(0.0f, 0.0f, m_radius, 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