From 4d83bbc0287894f280fdb097c7a81b1fadb034a4 Mon Sep 17 00:00:00 2001 From: swrring Date: Fri, 8 May 2026 11:37:45 +0900 Subject: [PATCH] =?UTF-8?q?BT5-Dev=20#82:=20PD=20Foreground=20TilemapColli?= =?UTF-8?q?der=20=EB=B6=80=EC=B0=A9=20=ED=9A=8C=EB=B3=B5=20(Enemy=20?= =?UTF-8?q?=EB=96=A8=EC=96=B4=EC=A7=90=20=EC=A0=95=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 보고 (2026-05-08): "여전히 몬스터가 낭떠러지로 사라졌어" 근본 원인: - BT66 R2 영역에서 PD Foreground TilemapCollider2D Object.Destroy - = PD 직접 그린 발판 영역 위에 Enemy 배치 시 발 아래 충돌 X = 떨어짐 - BT81 절벽 검출 영역 = footAhead Raycast Layer 0+16. PD Foreground = TilemapCollider X = Raycast 검출 X = 절벽 영역 인식 X = 떨어짐 정정 (BT82): - BT66 R2 영역의 PD Foreground TilemapCollider2D Destroy 영역 폐기 - TilemapCollider2D 부착 회복 + Layer 16 강제 (AutoForeground와 동일) 효과: - Player ↔ PD Foreground = Drop-Through 패턴 영역 정상 (통과·착지 분기) - Enemy ↔ PD Foreground = 충돌 ON (Layer 14 ↔ Layer 16) = 떨어짐 X - Enemy 절벽 검출 = PD Foreground·AutoForeground 모두 Layer 16 + TilemapCollider = 정합 후속 의무: - PD Refresh+Play 시각 검증 (Enemy 떨어짐 X·Player 통과 영역 그대로) --- Assets/Scripts/Mechanics/GameOptimizer.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index 6e62677..836f088 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -69,12 +69,15 @@ namespace Platformer.Mechanics applied++; } - // 2. PD Foreground = 가림막 시각만 (TilemapCollider2D 제거 → 충돌 X). + // 2. PD Foreground = 가림막 시각 + TilemapCollider 부착 (BT82 정정·PD 보고: Enemy 떨어짐). + // 이전 BT66 R2의 Object.Destroy 폐기 — Player는 Drop-Through 패턴 영역에서 통과·착지 분기 / Enemy는 충돌 ON. + // Layer 16 강제 (AutoForeground와 동일·Drop-Through 패턴 적용). var pdForeground = GameObject.Find("Foreground"); if (pdForeground != null) { + pdForeground.layer = 16; var pdFgTc = pdForeground.GetComponent(); - if (pdFgTc != null) Object.Destroy(pdFgTc); + if (pdFgTc == null) pdFgTc = pdForeground.AddComponent(); } // 3. AutoForeground GameObject (Grid 자식·신규) — 자동 분류 발판 전용.