瀏覽代碼

Add rotating breasts

Rotates breasts in the same way as studio mode.

Closes #31
habeebweeb 4 年之前
父節點
當前提交
37859f0686
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/IK/IK Chain/DragPointMune.cs

+ 8 - 1
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Meido/IK/IK Chain/DragPointMune.cs

@@ -29,7 +29,7 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
 
         protected override void UpdateDragType()
         {
-            if (Input.Control && Input.Alt) CurrentDragType = DragType.RotLocalXZ;
+            if (Input.Control && Input.Alt) CurrentDragType = Input.Shift ? DragType.RotLocalY : DragType.RotLocalXZ;
             else CurrentDragType = DragType.None;
         }
 
@@ -42,6 +42,13 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
                 Porc(IK, ikCtrlData, ikChain[jointUpper], ikChain[jointMiddle], ikChain[jointLower]);
                 InitializeRotation();
             }
+
+            if (CurrentDragType == DragType.RotLocalY)
+            {
+                Vector3 mouseDelta = MouseDelta();
+                ikChain[jointMiddle].localRotation = jointRotation[jointMiddle];
+                ikChain[jointMiddle].Rotate(Vector3.right * (-mouseDelta.x / 1.5f));
+            }
         }
     }
 }