From f993f94cc823cc0776d2558c52ab304a1ded1b62 Mon Sep 17 00:00:00 2001 From: Joel Vaz Date: Sat, 23 Dec 2023 14:01:27 +0000 Subject: [PATCH] Update main.cpp --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 958f669..6d79f7a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -454,8 +454,7 @@ void bindTexture(unsigned int texture, unsigned int textureUnit) { * @return model matrix */ glm::mat4 planetCreator(float translation, float distance, float rotation, float scale, glm::vec3 centerModel) { - glm::mat4 model = glm::mat4(1.0f); - model = glm::translate(model, centerModel); // move origin of rotation to center of model + glm::mat4 model = glm::translate(glm::mat4(1.0f), centerModel); // move origin of rotation to the center of model model = glm::rotate(model, (float) glfwGetTime() * translation, glm::vec3(0.0f, 1.0f, 0.0f)); model = glm::translate(model, glm::vec3(0.0f, 0.0f, distance)); model = glm::rotate(model, (float) glfwGetTime() * rotation, glm::vec3(0.0f, 1.0f, 0.0f));