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

@@ -121,7 +121,7 @@ int main()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
// configure view/projection matrices
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);
glm::mat4 view = camera.GetViewMatrix();
shader.use();
shader.setMat4("projection", projection);