Explorar o código

Fixed the shift of cursor guide point.

jcsyshc hai 1 ano
pai
achega
8e163ce696
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/module/impl/camera_augment_helper_v2.cpp

+ 1 - 1
src/module/impl/camera_augment_helper_v2.cpp

@@ -268,7 +268,7 @@ void camera_augment_helper_v2::impl::update_cursor_coordinate() {
 
     auto cam_mat = glm::rotate(last_camera.transform,
                                glm::radians(180.0f), glm::vec3(1.0f, 0.0f, 0.0f)); // camera -> viewport
-    auto w_pos_h = glm::inverse(cam_mat) * to_homo(c_pos);
+    auto w_pos_h = cam_mat * to_homo(c_pos);
     auto w_pos = from_homo(w_pos_h);
     cursor_pos = w_pos;
 }