Fixed rotation code

This commit is contained in:
Sascha Willems 2023-04-15 18:29:09 +02:00
parent 04f956c1d0
commit 899890a4fe

View file

@ -422,8 +422,8 @@ public:
if (cubes[0].rotation.x > 360.0f) if (cubes[0].rotation.x > 360.0f)
cubes[0].rotation.x -= 360.0f; cubes[0].rotation.x -= 360.0f;
cubes[1].rotation.y += 2.0f * frameTimer; cubes[1].rotation.y += 2.0f * frameTimer;
if (cubes[1].rotation.x > 360.0f) if (cubes[1].rotation.y > 360.0f)
cubes[1].rotation.x -= 360.0f; cubes[1].rotation.y -= 360.0f;
} }
if ((camera.updated) || (animate && !paused)) { if ((camera.updated) || (animate && !paused)) {
updateUniformBuffers(); updateUniformBuffers();