diff --git a/Assets/Scripts/Mechanics/PlayerController.cs b/Assets/Scripts/Mechanics/PlayerController.cs index 5fc89c7..d4af670 100644 --- a/Assets/Scripts/Mechanics/PlayerController.cs +++ b/Assets/Scripts/Mechanics/PlayerController.cs @@ -146,8 +146,18 @@ namespace Platformer.Mechanics if (jumpState == JumpState.Grounded && m_JumpAction.WasPressedThisFrame()) { // BT69 — Down + Jump = Drop-Through (PD 명시 2026-05-08) + // BT70 — 발판(Layer 16) 위 검증 추가 (PD 보고 2026-05-08: 지면 위 Down + Jump = 점프 X 버그) + // 발판 위만 Drop-Through 발동·지면 위 = 일반 점프 bool downHeld = moveInput.y < -0.5f; - if (downHeld) + bool onJumpThroughPlatform = false; + if (downHeld && collider2d != null) + { + Vector2 dropFootPos = new Vector2(collider2d.bounds.center.x, collider2d.bounds.min.y + 0.02f); + int jumpThroughMask = 1 << JUMP_THROUGH_LAYER; + RaycastHit2D dropFootHit = Physics2D.Raycast(dropFootPos, Vector2.down, 0.1f, jumpThroughMask); + onJumpThroughPlatform = dropFootHit.collider != null; + } + if (downHeld && onJumpThroughPlatform) { dropThroughTimer = DROP_THROUGH_DURATION; dropThroughJump = true;