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));