From 151cd1794b3965cad459dfb159a867e55a94ee24 Mon Sep 17 00:00:00 2001 From: swrring Date: Thu, 7 May 2026 17:11:20 +0900 Subject: [PATCH] =?UTF-8?q?BT5-Dev=20#28:=20Tilemap=20Layer=208=20?= =?UTF-8?q?=EB=B3=80=ED=99=98=20+=20STOMP=5FDELTA=20=EC=8B=9C=EA=B0=81=20?= =?UTF-8?q?=EC=A0=95=ED=95=A9=20(-0.4~-0.05)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 보고: 1. 발판 통과 X — Tilemap Layer 0 그대로 → 일반 충돌 → 점프 통과 X 2. 밟기 위치 너무 높음 — STOMP_DELTA_MAX +0.1 → 시각 발이 Enemy 머리 위 0.1 떠 있음 데이터 진단: - [BT27-JumpThrough] applied=1 (Alien only) — Tilemap 제외로 발판 영역 미적용 - [PEC] stomped=True delta=-0.11~-0.28 — Collider 영역만 정합 / 시각 영역 차이 0.2 정정: - GameOptimizer: TilemapCollider2D 제외 영역 폐기 → 모든 일반 Collider Layer 8 변환 - PlayerEnemyCollision: STOMP_DELTA -0.3~+0.1 → -0.4~-0.05 (Player Collider Offset +0.10 + Enemy sprite 위 여백 0.1 보정) Drop-Through 패턴 동작: - 모든 지면·발판 Layer 8 = 기본 통과 (Player 13 ↔ Layer 8 IgnoreLayerCollision) - Player 하강 + 발 Raycast hit → IgnoreCollision(false) 임시 활성 = 착지 - 점프(상승) → IgnoreCollision(true) 복구 = 통과 --- Assets/Scripts/Mechanics/GameOptimizer.cs | 11 ++++++----- Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index 32d5b70..9541234 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -31,6 +31,8 @@ namespace Platformer.Mechanics [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void SetupJumpThroughPlatforms() { + // BT5-Dev #28 — Tilemap 영역 포함 모든 일반 Collider Layer 8 변환. + // Drop-Through 표준 패턴 = 모든 발판·지면이 Layer 8. PlatformDropThrough Raycast가 하강 시 충돌 활성 = 착지. int applied = 0, excluded = 0; var allColliders = Object.FindObjectsByType(FindObjectsSortMode.None); var appliedNames = new System.Collections.Generic.List(); @@ -38,7 +40,6 @@ namespace Platformer.Mechanics { if (c == null) continue; if (c.isTrigger) { excluded++; continue; } - if (c.GetComponent() != null) { excluded++; continue; } if (c.GetComponent() != null || c.GetComponent() != null || c.GetComponent() != null @@ -50,18 +51,18 @@ namespace Platformer.Mechanics continue; } - // PlatformEffector2D 잔존 영역 제거 (BT25 누적 영향 차단) + // PlatformEffector2D 잔존 제거 (BT25 누적 영향 차단) var effector = c.GetComponent(); if (effector != null) Object.Destroy(effector); c.usedByEffector = false; - // Layer 8 변환 → IgnoreLayerCollision로 기본 통과 + // Layer 8 변환 → IgnoreLayerCollision 기본 통과 + PlatformDropThrough Raycast 착지 c.gameObject.layer = 8; applied++; if (appliedNames.Count < 8) appliedNames.Add($"{c.gameObject.name}({c.GetType().Name})"); } - Debug.Log($"[BT27-JumpThrough] applied={applied} excluded={excluded} total={allColliders.Length}"); - Debug.Log($"[BT27-JumpThrough] appliedSamples=[{string.Join(", ", appliedNames)}]"); + Debug.Log($"[BT28-JumpThrough] applied={applied} excluded={excluded} total={allColliders.Length}"); + Debug.Log($"[BT28-JumpThrough] appliedSamples=[{string.Join(", ", appliedNames)}]"); } } } diff --git a/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta b/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta new file mode 100644 index 0000000..8725e6b --- /dev/null +++ b/Assets/Scripts/Mechanics/PlatformDropThrough.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: bc0df74503a03ee478bb504a5cd1b0c3 \ No newline at end of file