fix: use radians instead of degrees for camera zoom.

This commit is contained in:
Joey de Vries
2017-09-21 08:35:13 +02:00
parent c6b404915d
commit 2e0035a8d4
28 changed files with 28 additions and 28 deletions

View File

@@ -237,7 +237,7 @@ int main()
shader.use();
glm::mat4 model;
glm::mat4 view = camera.GetViewMatrix();
glm::mat4 projection = glm::perspective(camera.Zoom, (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
glm::mat4 projection = glm::perspective(glm::radians(camera.Zoom), (float)SCR_WIDTH / (float)SCR_HEIGHT, 0.1f, 100.0f);
shader.setMat4("model", model);
shader.setMat4("view", view);
shader.setMat4("projection", projection);