소스 검색

Tweak dragpoint general rotation further

Closes #8
habeebweeb 4 년 전
부모
커밋
6907d50384
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/DragPoint/DragPointGeneral.cs

+ 6 - 2
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/DragPoint/DragPointGeneral.cs

@@ -163,8 +163,12 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             if (CurrentDragType == DragType.RotLocalXZ)
             {
                 MyObject.rotation = currentRotation;
-                MyObject.Rotate(camera.transform.forward, -mouseDelta.x / 6f, Space.World);
-                MyObject.Rotate(camera.transform.right, mouseDelta.y / 4f, Space.World);
+                Vector3 forward = camera.transform.forward;
+                Vector3 right = camera.transform.right;
+                forward.y = 0f;
+                right.y = 0f;
+                MyObject.Rotate(forward, -mouseDelta.x / 6f, Space.World);
+                MyObject.Rotate(right, mouseDelta.y / 4f, Space.World);
                 OnRotate();
             }