From 7b8b122341ade06ed374bb3e1472b5a40b01aa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 27 Jan 2023 18:33:04 +0100 Subject: [PATCH] Update --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5e0c337..c4eefb2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,6 +101,8 @@ int main(int argc, char **argv) auto imu_base_mat = glm::translate(glm::mat4(1.0f), glm::vec3(2.0,0.0,0.0)); imu.setModelMatrix(imu_base_mat); + auto imu_correction_matrix = glm::rotate(glm::mat4(1.0f), glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f)); + auto imu_correction_inverse = glm::inverse(imu_correction_matrix); glEnable(GL_DEPTH_TEST); @@ -181,8 +183,6 @@ int main(int argc, char **argv) coords.render(); auto imu_rot_mat = imu_serial.get_rot_matrix(); - auto imu_correction_matrix = glm::rotate(glm::mat4(1.0f), glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f)); - auto imu_correction_inverse = glm::inverse(imu_correction_matrix); auto imu_model_matrix = imu_base_mat * imu_correction_inverse * imu_rot_mat * imu_correction_matrix;