Browse Source

Add rotating breasts

Rotates breasts in the same way as studio mode.

Closes #31
habeebweeb 3 years ago
parent
commit
37859f0686

+ 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));
+            }
         }
     }
 }