From 76d12a1140285fb165531389d433c2ed7fc06e07 Mon Sep 17 00:00:00 2001 From: "tung.do@monkey.edu.vn" Date: Fri, 31 Oct 2025 02:20:50 +0700 Subject: [PATCH] fix: update auto move attack normal HP (fix move underground). --- Assets/PerfectWorld/Scripts/Move/EC_CDR.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs b/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs index 259a97620f..33c4477773 100644 --- a/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs +++ b/Assets/PerfectWorld/Scripts/Move/EC_CDR.cs @@ -136,11 +136,11 @@ namespace BrewMonster.Scripts bSupport = false; float dist = Mathf.Max(fDeltaY, 0f); - Vector3 origin = vStart + Vector3.down * vExt.y; + Vector3 origin = vStart /*+ Vector3.down * vExt.y*/; if (Physics.Raycast(origin, (Vector3.down ).normalized, out RaycastHit hit, 1<<6 | 1<<7)) { vHitNormal = hit.normal; - Debug.DrawLine(origin, vHitNormal, Color.black, 10f); + //Debug.DrawLine(origin, vHitNormal, Color.black, 10f); vEnd = new Vector3(vStart.x, hit.point.y + vExt.y, vStart.z); bSupport = (vHitNormal.y >= 0f); return true; @@ -220,11 +220,11 @@ namespace BrewMonster.Scripts //bool hasHit = CollideWithEnv_BoxCast(vStart, vDelta, vExt, mask, // out RaycastHit hit, out float fFraction, out Vector3 hitNormal, out bool bStartSolid); Vector3 posFoot = vStart - Vector3.up * vExt.y; - bool bClear = !Physics.Raycast(posFoot, (posFoot + vVelocity).normalized, out RaycastHit hit, fDeltaDist, mask); + bool bClear = !Physics.Raycast(posFoot, (posFoot + vDelta).normalized, out RaycastHit hit, fDeltaDist, mask); nTry++; - Debug.DrawLine(posFoot, posFoot + vVelocity, Color.yellow, 10f); if (bClear) { + Debug.DrawLine(posFoot, posFoot + vDelta, Color.yellow, 10f); vFinalPos = vStart + vDelta; CDRInfo.fMoveDist += fDeltaDist; break;