Просмотр исходного кода

模拟鼠标不受timescale游戏影响

lvjincheng 4 лет назад
Родитель
Сommit
c53e138183
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Assets/BowArrow/Scripts/Expand/SB_EventSystem.cs

+ 1 - 1
Assets/BowArrow/Scripts/Expand/SB_EventSystem.cs

@@ -103,7 +103,7 @@ public class SB_EventSystem : MonoBehaviour
             if (!simulateMouseIsAwaked) return;
             if (hasAxisQuat) {
                 Vector3 lastAngle = nowAxisQuat.eulerAngles;
-                nowAxisQuat = Quaternion.Lerp(nowAxisQuat, targetAxisQuat, Time.deltaTime * 8f);
+                nowAxisQuat = Quaternion.Lerp(nowAxisQuat, targetAxisQuat, 0.333f * 8);
                 Vector3 curAngle = nowAxisQuat.eulerAngles;
                 float dx = FormatDeltaAngleY(curAngle.y - lastAngle.y) / 150f * simulateMouse.GetScaleScreenWidth();
                 float dy = -FormatDeltaAngleX(curAngle.x - lastAngle.x) / 100f * simulateMouse.GetScaleScreenHeight();