Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
joelvaz0x01 committed Dec 23, 2023
1 parent cdd1104 commit f993f94
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f993f94

Please sign in to comment.