Skip to content
Snippets Groups Projects
Commit a4e29b5c authored by Pascal Engeler's avatar Pascal Engeler
Browse files

Fixed a bug

parent 1d6ea4e6
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ public: ...@@ -36,7 +36,7 @@ public:
//float s_extent_h = 0.2 * std::tan(3.14159265 * 45 / 180.); //float s_extent_h = 0.2 * std::tan(3.14159265 * 45 / 180.);
float s_extent_h = 0.2f * std::tan(3.14159265 * 45 / 180. / 2.); float s_extent_h = 0.2f * std::tan(3.14159265 * 45 / 180. / 2.);
float s_extent_w = WIDTH / static_cast<float>(HEIGHT) * s_extent_h; float s_extent_w = WIDTH / static_cast<float>(HEIGHT) * s_extent_h;
glm::vec3 p_mouse = p_sCenter + (mx - 0.5f) * s_extent_w * 0.5f * GetRightVector() + (my - 0.5f) * s_extent_h * 0.5f * curr_up; //TODO: Potentially needs (1-my) instead of my glm::vec3 p_mouse = p_sCenter + (mx - 0.5f) * s_extent_w * GetRightVector() + (my - 0.5f) * s_extent_h * curr_up; //TODO: Potentially needs (1-my) instead of my
glm::vec3 r = glm::normalize(p_mouse - p_eye); glm::vec3 r = glm::normalize(p_mouse - p_eye);
if (std::abs(r.z) > 0.00001) { if (std::abs(r.z) > 0.00001) {
float t = -p_mouse.z / r.z; float t = -p_mouse.z / r.z;
......
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