From 835f572e95bf181d2f74442310ebd2eff950f999 Mon Sep 17 00:00:00 2001 From: swrring Date: Fri, 8 May 2026 00:14:59 +0900 Subject: [PATCH] =?UTF-8?q?BT5-Dev=20#67:=20AutoForeground=20transform=20?= =?UTF-8?q?=EB=8F=99=EA=B8=B0=ED=99=94=20=E2=80=94=20y+1=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=81=20=EC=98=81=EC=97=AD=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): "발판의 위치가 1만큼 y로 올라갔는데 왜 그런거지?" 근본 원인: - BT66 R2 — AutoForeground GameObject 신규 생성 (Grid 자식) - 신규 생성 시 transform.localPosition = default (0, 0, 0) - PD가 Level·Foreground GameObject를 y=-1로 직접 변경 (PD 시각 정정 작업) - = AutoForeground (y=0) ↔ Level/Foreground (y=-1) → 1m 차이로 시각상 위로 정정 (1행 추가): - 매 Play 시점 AutoForeground.transform.localPosition = PD Foreground localPosition (또는 Level) - PD Foreground 우선 (가림막 영역과 동일 공간 보장) · 미존재 시 Level fallback 효과: - AutoForeground 발판 시각 위치 = PD Foreground·Level 영역과 동일 - Drop-Through 패턴 작동 영역 동일 (Layer 16 + ContactFilter mask) - 발판 위 착지 좌표 정합 (Player 영역과 정합) 후속 의무: - PD Refresh+Play 시각 검증 - BT67 commit으로 R2 영역 완결 --- Assets/Scripts/Mechanics/GameOptimizer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index 2778352..d64fb56 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -96,6 +96,11 @@ namespace Platformer.Mechanics if (autoFg != null) { autoFg.layer = 16; + // BT67 — PD 보고 (2026-05-08): "발판의 위치가 1만큼 y로 올라갔는데 왜 그런거지?" + // 원인: AutoForeground 신규 생성 시 transform default (0,0,0) ↔ PD가 Level/Foreground를 y=-1로 직접 변경 + // 정정: 매 Play 시점 PD Foreground(또는 Level) localPosition와 동기화 + var refGo = pdForeground != null ? pdForeground : GameObject.Find("Level"); + if (refGo != null) autoFg.transform.localPosition = refGo.transform.localPosition; fgTilemap = autoFg.GetComponent(); if (fgTilemap == null) fgTilemap = autoFg.AddComponent(); if (autoFg.GetComponent() == null)