Browse Source

修复播放完特效中的摄像机震动效果后,摄像机就不知踪影的bug

大爷 1 year ago
parent
commit
2481d69dbd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Unity/Assets/Scripts/Codes/HotfixView/Client/Camera/CameraMgr.cs

+ 2 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Camera/CameraMgr.cs

@@ -31,10 +31,11 @@ namespace ET.Client
             bShaking = true;
 
             Transform trans = GlobalViewComponent.Instance.BattleCamera.transform;
+            var savePos = trans.localPosition;
             Tweener tweener = trans.DOShakePosition(shakeTime, shakeStength);
             tweener.OnComplete<Tweener>(() =>
             {
-                trans.localPosition = Vector3.zero;
+                trans.localPosition = savePos;
                 bShaking = false;
             });
         }