Altered glm::rotate parameters

This commit is contained in:
Ano-sys
2025-04-04 18:03:31 +02:00
parent 8e0234c1fb
commit cf88fecf08
+4 -1
View File
@@ -967,9 +967,12 @@ namespace vapp{
auto currentTime = std::chrono::high_resolution_clock::now();
float time = std::chrono::duration<float, std::chrono::seconds::period>(currentTime - startTime).count();
// to not pass rotation over time instead by fps
// float time = (currentTime - startTime).count();
UniformBufferObject ubo{};
// INFO: Change here for other angles
ubo.model = glm::rotate(glm::mat4(1.0f), time * glm::radians(90.0f), glm::vec3(0.2f, 0.2f, 1.0f));
ubo.model = glm::rotate(glm::mat4(1.0f), time * glm::radians(60.0f), glm::vec3(0.2f, 0.2f, 0.8f));
ubo.view = glm::lookAt(glm::vec3(2.0f, 2.0f, 2.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 1.0f));
ubo.proj = glm::perspective(glm::radians(45.0f), swapChainExtent.width / (float)swapChainExtent.height, 0.1f, 10.0f);