Kaynağa Gözat

修复法术碰撞特效不显示的bug

大爷 1 yıl önce
ebeveyn
işleme
7c201d980f

+ 1 - 1
Unity/Assets/Scripts/Codes/HotfixView/Client/Effect/EffectMgr.cs

@@ -140,7 +140,7 @@ namespace ET.Client
             if (pos != Vector3.zero)
             {
                 vecTemp.Set(effectData.EffectOffsetX, effectData.EffectHight, effectData.EffectOffsetY);
-                gt.position = pos + vecTemp;
+                gt.position = RenderUtils.UnityPosFromBattle(pos + vecTemp);
             }
             if (rotation != 0)
             {

+ 5 - 0
Unity/Assets/Scripts/Codes/HotfixView/Client/RenderUtils.cs

@@ -18,6 +18,11 @@ public static class RenderUtils
         vecTemp.Set(pos.X, pos.Z, MapHeight - pos.Y);
         return vecTemp;
     }
+    public static UnityEngine.Vector3 UnityPosFromBattle(UnityEngine.Vector3 pos)
+    {
+        vecTemp.Set(pos.x, pos.z, MapHeight - pos.y);
+        return vecTemp;
+    }
 
     public static UnityEngine.Quaternion UnityRotationFromBattle(float rotation, float rotationX = 0f)
     {