yyl
2026-01-28 d1ec6bf485cf9179d157554eaef7a2339233dd03
Main/System/Battle/SkillEffect/BulletCurve/BulletCurve.cs
@@ -34,14 +34,15 @@
        this.hurts = hurtList;
        this.mBulletIndex = bulletIndex;
        // 设置bulletTrans坐标为caster.heroRectTrans的世界坐标转换到bulletTrans父节点下的本地坐标
        if (bulletTrans != null && caster.heroRectTrans != null)
        // 设置bulletTrans坐标为caster的世界坐标转换到bulletTrans父节点下的本地坐标
        RectTransform casterRect = caster.GetRectTransform();
        if (bulletTrans != null && casterRect != null)
        {
            var parent = bulletTrans.parent as RectTransform;
            Vector2 localPoint;
            RectTransformUtility.ScreenPointToLocalPointInRectangle(
                parent,
                RectTransformUtility.WorldToScreenPoint(null, caster.heroRectTrans.position),
                RectTransformUtility.WorldToScreenPoint(null, casterRect.position),
                null,
                out localPoint);
            bulletTrans.anchoredPosition = localPoint;