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;