Browse Source

拍照旋转

zhaoyang 3 years ago
parent
commit
7b20bb8920
1 changed files with 2 additions and 2 deletions
  1. 2 2
      GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -190,7 +190,7 @@ namespace GFGGame
                 {
                     lastPos = Vector2.zero;
                     // _ui.m_comSelectBox.target.SetScale(1, 1);
-                    _ui.m_comSelectBox.target.rotation = hitParentGameObj.transform.rotation.z;
+                    _ui.m_comSelectBox.target.rotation = -hitParentGameObj.transform.eulerAngles.z;
                     _ui.m_comSelectBox.target.size = SceneController.GetGameObjectSize(hitParentGameObj);
                     _ui.m_comSelectBox.target.SetScale(hitParentGameObj.transform.localScale.x, hitParentGameObj.transform.localScale.y);
                 }
@@ -269,7 +269,7 @@ namespace GFGGame
             Vector2 pt2 = this.viewCom.GlobalToLocal(new Vector2(_ui.m_comSelectBox.target.x, _ui.m_comSelectBox.target.y));
             float dist = Vector2.Distance(pt1, pt2);
 
-            _startDistance = dist;// Mathf.Sqrt(size.x * size.x + size.y * size.y) / 2;// Vector2.Distance(pt1, pt2);
+            _startDistance = dist / _ui.m_comSelectBox.target.scaleX;// Mathf.Sqrt(size.x * size.x + size.y * size.y) / 2;// Vector2.Distance(pt1, pt2);
             Debug.Log("_startDistance:" + _startDistance);
         }
         private void OnClickBtnSizeMove(EventContext context)