Skip to content

Commit

Permalink
this is not a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
ixchow committed Sep 6, 2018
1 parent 07e26e0 commit 5c215dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CratesMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ bool CratesMode::handle_event(SDL_Event const &evt, glm::uvec2 const &window_siz
return true;
}
if (evt.type == SDL_MOUSEMOTION) {
//Note: float(window_size.y) * camera->fovy is a pixels-to-radians conversion factor
float yaw = evt.motion.xrel / float(window_size.y) * camera->fovy;
float pitch = evt.motion.yrel / float(window_size.y) * camera->fovy;
yaw = -yaw;
Expand Down

0 comments on commit 5c215dd

Please sign in to comment.