Skip to content

Commit

Permalink
Fixed #2193
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Dec 21, 2024
1 parent fd2a0de commit 4a8f82c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/systems/rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void RenderSystem::render3D(float aspect, float camera_fov)

glm::mat4 calculateModelMatrix(glm::vec2 position, float rotation, glm::vec3 mesh_offset, float scale) {
auto model_matrix = glm::translate(glm::identity<glm::mat4>(), glm::vec3{ position.x, position.y, 0.f });
model_matrix = glm::rotate(model_matrix, glm::pi<float>(), glm::vec3{ 0.f, 0.f, 1.f });
model_matrix = glm::rotate(model_matrix, glm::radians(rotation), glm::vec3{ 0.f, 0.f, 1.f });
model_matrix = glm::translate(model_matrix, mesh_offset);
model_matrix = glm::scale(model_matrix, glm::vec3{scale});
Expand Down

0 comments on commit 4a8f82c

Please sign in to comment.