This commit is contained in:
Mario Hüttel 2023-01-27 18:33:04 +01:00
parent 2b4cf24991
commit 7b8b122341
1 changed files with 2 additions and 2 deletions

View File

@ -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;