From 5b199cbe6f01c3da043a4b4960b59773ef799437 Mon Sep 17 00:00:00 2001 From: swrring Date: Fri, 8 May 2026 00:43:25 +0900 Subject: [PATCH] =?UTF-8?q?BT5-Dev=20#74:=20=EB=B0=9C=ED=8C=90=20=EA=B0=80?= =?UTF-8?q?=EC=9E=A5=EC=9E=90=EB=A6=AC=20=EB=B0=80=EB=A6=BC=20=EC=8B=9C=20?= =?UTF-8?q?=EA=B0=95=EC=A0=9C=20Drop-Through=20(PD=20=EA=B6=8C=EA=B3=A0=20?= =?UTF-8?q?=EC=B1=84=ED=83=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 권고 (2026-05-08): "한번이라도 밀리면 아래로 강제로 떨구어야하지 않을까?" 진단: - BT73 후 footHit 3점 안정화에도 특수 영역 잔존 - 점프 정점(velocity.y ≈ 0) + 수평 이동 시도 + 발판 가장자리 = 발판 일시 검출 - = standingOnPlatform=true → mask ON → body.Cast 충돌 → 수평·수직 정지 - = '밀린 상태 고정' 정정 (BT74 — UpdateContactFilterForDropThrough 영역 추가): 밀림 상태 검출 4조건 AND 결합: 1. standingOnPlatform=true (footHit 3점 검출) 2. inAir = jumpState == Jumping || jumpState == InFlight (점프·낙하 중) 3. nearApex = velocity.y > -1.5f (정점·낙하 초기) 4. horizontalIntent = Mathf.Abs(move.x) > 0.1f (수평 이동 시도) 검출 시 강제 Drop-Through: - dropThroughTimer = DROP_THROUGH_DURATION (0.3초 mask 강제 OFF) - standingOnPlatform = false (즉시 해제) - = Player 발판 통과 + 자연 낙하 시작 효과: - 발판 가장자리 정점 + 수평 이동 시 = 강제 통과 (밀림 X) - 정상 착지 (velocity.y < -1.5 빠른 descending) = 영역 외 → 그대로 착지 - 발판 위 정지 (Grounded·수평 입력 X) = 영역 외 → 그대로 - ascending·Drop-Through·일반 점프 = 그대로 후속 의무: - PD Refresh+Play 시각 검증 (특수 재현 경로 + 다양한 점프 영역) --- Assets/Scripts/Mechanics/PlayerController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Assets/Scripts/Mechanics/PlayerController.cs b/Assets/Scripts/Mechanics/PlayerController.cs index ebd0c06..d570458 100644 --- a/Assets/Scripts/Mechanics/PlayerController.cs +++ b/Assets/Scripts/Mechanics/PlayerController.cs @@ -263,6 +263,18 @@ namespace Platformer.Mechanics RaycastHit2D footHitL = Physics2D.Raycast(new Vector2(boundsLeft, footY), Vector2.down, 0.1f, jumpThroughMask); RaycastHit2D footHitR = Physics2D.Raycast(new Vector2(boundsRight, footY), Vector2.down, 0.1f, jumpThroughMask); standingOnPlatform = footHitC.collider != null || footHitL.collider != null || footHitR.collider != null; + + // BT74 — 밀림 상태 강제 Drop-Through (PD 권고 2026-05-08: "한번이라도 밀리면 아래로 강제로 떨구어야") + // 점프·낙하 중 정점 영역(velocity.y > -1.5) + 수평 입력 + 발판 가장자리 일시 검출 = 밀림 상태 + // → dropThroughTimer 강제 활성 + standingOnPlatform=false 즉시 해제 + bool inAir = jumpState == JumpState.Jumping || jumpState == JumpState.InFlight; + bool nearApex = velocity.y > -1.5f; + bool horizontalIntent = Mathf.Abs(move.x) > 0.1f; + if (standingOnPlatform && inAir && nearApex && horizontalIntent) + { + dropThroughTimer = DROP_THROUGH_DURATION; + standingOnPlatform = false; + } } // standingOnPlatform=true → Layer 16 ON (착지·서있는 영역 영역 X) / 그 외 → Layer 16 OFF (통과)