Browse Source

换装位置偏移

guodong 1 year ago
parent
commit
f686531709

+ 2 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpLayerOperation.cs

@@ -270,7 +270,8 @@ namespace GFGGame
                 DressUpUtil.AddSpriteObj(this.resPath, spritObjName, parentObj, sortingOrder, needSetMask);
                 DressUpUtil.AddSpriteObj(this.resPath, spritObjName, parentObj, sortingOrder, needSetMask);
                 if (removeBodyAni)
                 if (removeBodyAni)
                 {
                 {
-                    parentObj.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity); 
+                    parentObj.transform.localPosition = Vector3.zero;
+                    parentObj.transform.localRotation = Quaternion.identity;
                 }
                 }
             }
             }
             if (!string.IsNullOrEmpty(effectResPath))
             if (!string.IsNullOrEmpty(effectResPath))

+ 2 - 1
GameClient/Assets/Game/HotUpdate/DressUp/DressUpUtil.cs

@@ -331,7 +331,8 @@ namespace GFGGame
                     dressUpBodyOffsetInfo.Rotation = gameObj.transform.localRotation;
                     dressUpBodyOffsetInfo.Rotation = gameObj.transform.localRotation;
                 }
                 }
                 //如果是动作动画,就根据动画位置及角度信息设置给Role对象
                 //如果是动作动画,就根据动画位置及角度信息设置给Role对象
-                parentObj.transform.SetPositionAndRotation(dressUpBodyOffsetInfo.OffsetPosition, dressUpBodyOffsetInfo.Rotation);
+                parentObj.transform.localPosition = dressUpBodyOffsetInfo.OffsetPosition;
+                parentObj.transform.rotation = dressUpBodyOffsetInfo.Rotation;
                 gameObj.transform.localPosition = Vector3.zero;
                 gameObj.transform.localPosition = Vector3.zero;
                 gameObj.transform.rotation = Quaternion.identity;
                 gameObj.transform.rotation = Quaternion.identity;
                 //.SetPositionAndRotation(Vector3.zero, Quaternion.identity); 
                 //.SetPositionAndRotation(Vector3.zero, Quaternion.identity); 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/LuckyBoxController.cs

@@ -109,7 +109,7 @@ namespace GFGGame
         {
         {
             _bgIndex = 0;
             _bgIndex = 0;
             _modelIndex = 0;
             _modelIndex = 0;
-            _dressUpObjUI.ResetSceneObj(0, false, false, null, false);
+            _dressUpObjUI.dressUpObj.TakeOffAll();
             UI_ComModel _comModel = UI_ComModel.Proxy(_com);
             UI_ComModel _comModel = UI_ComModel.Proxy(_com);
             _comModel.m_comModelRes.m_loaRes.url = "";
             _comModel.m_comModelRes.m_loaRes.url = "";
             UI_ComModel.ProxyEnd();
             UI_ComModel.ProxyEnd();