diff --git a/Assets/Scripts/Mechanics/EnemyController.cs b/Assets/Scripts/Mechanics/EnemyController.cs index 45865f3..53e2735 100644 --- a/Assets/Scripts/Mechanics/EnemyController.cs +++ b/Assets/Scripts/Mechanics/EnemyController.cs @@ -132,12 +132,14 @@ namespace Platformer.Mechanics } _lastX = transform.position.x; - // BT83 — 수평 벽 검출 (PD 보고 2026-05-08): 벽 가장자리 미세 밀림 → 절벽 떨어짐 차단 - // 발 영역 horizontal Raycast Layer 0+16 검출 시 = 벽 → 다음 phase 즉시 강제 + // BT84 — 수평 벽 검출 정정 (PD 보고 2026-05-08): BT83 거짓 양성 차단 + // BT83 시작 영역(bounds 내부)이 Foreground Tile 위에서 옆 Tile 검출 → 거짓 양성 → patrol X + // 정정: Raycast 시작 영역 = Capsule bounds 외부 (자기 검출 X) if (Mathf.Abs(dx) > patrolArriveThreshold && _collider != null) { + float halfWidth = _collider.bounds.extents.x; Vector2 wallOrigin = new Vector2( - _collider.bounds.center.x + moveDir * 0.05f, + _collider.bounds.center.x + moveDir * (halfWidth + 0.05f), _collider.bounds.center.y ); RaycastHit2D wallHit = Physics2D.Raycast(wallOrigin, new Vector2(moveDir, 0), wallCheckDistance, groundLayerMask);