From 82b21d045839a94d036ad972d6379c2f7a14bc78 Mon Sep 17 00:00:00 2001 From: Orange Date: Sat, 29 Nov 2025 21:34:40 +0300 Subject: [PATCH] fixed rotation --- examples/example_glfw3.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/example_glfw3.cpp b/examples/example_glfw3.cpp index 4fd8883..d56d352 100644 --- a/examples/example_glfw3.cpp +++ b/examples/example_glfw3.cpp @@ -302,6 +302,9 @@ int main() RotationAngles rot = cube.get_rotation_angles(); rot.yaw += omath::opengl_engine::YawAngle::from_degrees(40.f * deltaTime); rot.roll += omath::opengl_engine::RollAngle::from_degrees(40.f * deltaTime); + + if (rot.pitch.as_degrees() == 90.f) + rot.pitch = omath::opengl_engine::PitchAngle::from_degrees(-90.f); rot.pitch += omath::opengl_engine::PitchAngle::from_degrees(40.f * deltaTime); cube.set_rotation(rot);