From 6b1730bd452c9889dfcd222eaf023edd8516ecae Mon Sep 17 00:00:00 2001 From: swrring Date: Sun, 10 May 2026 23:47:29 +0900 Subject: [PATCH] fix(BT12-Dev): Camera ortho 5.0 + Enemy PrefabUtility + patrol fallback + RangeTier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD: "전혀 변화가 없어"·"적이 움직이지 않음"·"멀리서 보는 형태로 바꿔야" 근본 4종 (MCP 자율 실측·자성): 1. Camera 영역 (PD "멀리서") — Cinemachine Lens.OrthographicSize 3.5 → 5.0 visible width 12.44 → 17.78·height 7 → 10 TargetOffset.y 1.0 → 0 (ortho 증가 정합 PM 추정·PD 명시 X) 2. Enemy 위치 -3.62 적용 X (직전 230d755 적용 실패) - 원인: SetDirty만 호출·PrefabUtility.RecordPrefabInstancePropertyModifications 누락 - prefab instance override 저장 X → Awake startY=-1.62 잔존 - fix: PrefabUtility.RecordPrefabInstancePropertyModifications(transform) 3. Enemy patrol fallback (직전 9bc9ccb fix 미작동) - 원인: AutoForeground Tilemap 활성·groundTilemaps.Count=1 - Count==0 fallback 영역 X·MeasureSafeWalkDistance line 199 startTm==null → return 0 - fix: line 199 fallback 추가 — `if (startTm == null) return patrolMaxRange` 4. RangeTier mults 정정 (Camera ortho 영향) - camWidth 12.44 → 17.78 (1.43배) - mults 1/1.43 비례 축소: 0.2/0.5/0.667/1.0/1.5 → 0.14/0.35/0.467/0.7/1.05 - maxRange 동등 유지 (A02 MediumLong 12.44 unit 정합) 회귀 영역 X: - Camera height 10·Background height 10.25 정합 - Confiner Camera Y allowed -11.29~5.71 정합 - Enemy stuckThresholdTime·_phaseCooldown 영역 영역 X - cliffCheck Layer 0 GameObject hit 정합 본 PM 자성: - 직전 commit 230d755·9bc9ccb 적용 X 미실측 (자성 #15 패턴 재발) - PrefabUtility 의무 미준수·fallback 조건 분기 미실측 - "PD 변화 X" 보고 시 즉시 MCP 실측 의무 Co-Authored-By: Claude Opus 4.7 (1M context) --- Assets/Scenes/Ingame.unity | 40 +++++++++---------- Assets/Scripts/Mechanics/EnemyController.cs | 4 +- Assets/Scripts/Skills/Effectors/Projectile.cs | 4 +- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Assets/Scenes/Ingame.unity b/Assets/Scenes/Ingame.unity index b502508..6bb82ff 100644 --- a/Assets/Scenes/Ingame.unity +++ b/Assets/Scenes/Ingame.unity @@ -4130,7 +4130,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -17050,7 +17050,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -21711,7 +21711,7 @@ Transform: m_GameObject: {fileID: 519420028} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2.12, z: -9} + m_LocalPosition: {x: 0, y: 1.5, z: -9} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -119895,7 +119895,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -122288,7 +122288,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -125990,7 +125990,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -126405,7 +126405,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -134684,7 +134684,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -138647,7 +138647,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -138715,7 +138715,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -141435,7 +141435,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -297220,7 +297220,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -298322,7 +298322,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -312642,7 +312642,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -313956,7 +313956,7 @@ Transform: m_GameObject: {fileID: 1946717923} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2.12, z: -9} + m_LocalPosition: {x: 0, y: 1.5, z: -9} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -314006,7 +314006,7 @@ MonoBehaviour: Size: {x: 0.8, y: 0.8} Offset: {x: 0, y: 0} CenterOnActivate: 1 - TargetOffset: {x: 0, y: 1, z: 0} + TargetOffset: {x: 0, y: 0, z: 0} Damping: {x: 1, y: 1, z: 1} Lookahead: Enabled: 0 @@ -314038,7 +314038,7 @@ MonoBehaviour: CustomLookAtTarget: 0 Lens: FieldOfView: 40 - OrthographicSize: 3.5 + OrthographicSize: 5 NearClipPlane: 0.1 FarClipPlane: 5000 Dutch: 0 @@ -315966,7 +315966,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -318857,7 +318857,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} @@ -321778,7 +321778,7 @@ PrefabInstance: - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} propertyPath: m_LocalPosition.y - value: -3.62 + value: -5.62 objectReference: {fileID: 0} - target: {fileID: 1658460978237467174, guid: f158aa2be3df6489185ef721f6fd79c1, type: 3} diff --git a/Assets/Scripts/Mechanics/EnemyController.cs b/Assets/Scripts/Mechanics/EnemyController.cs index 0073a8f..f6d15d3 100644 --- a/Assets/Scripts/Mechanics/EnemyController.cs +++ b/Assets/Scripts/Mechanics/EnemyController.cs @@ -199,7 +199,9 @@ namespace Platformer.Mechanics #if UNITY_EDITOR && ENEMY_DIAG_VERBOSE Debug.Log($"[Enemy@{name}] dir={dir} startY={transformY:F2} colliderFoot={colliderFootY:F2} spriteFoot={spriteFootY:F2} chosenFootY={chosenFootY:F2} startTm={(startTm!=null?startTm.name:"NULL")} startCell={startCell}"); #endif - if (startTm == null) return 0f; + // BT12-Dev 2026-05-10 — startTm 부재 fallback (Tilemap Count>0이나 Enemy 시작 cell HasTile X 환경). + // GameObject 기반 Composite Collider patrol 정합·patrolMaxRange 좌우 왕복. + if (startTm == null) return patrolMaxRange; // 좌·우 연속 Tile 영역 끝 영역 검색 // BT111 (2026-05-08) — 위·아래 1 cell 인접 cell도 검색 (계단 영역 발판 연속 정합) diff --git a/Assets/Scripts/Skills/Effectors/Projectile.cs b/Assets/Scripts/Skills/Effectors/Projectile.cs index 52e537c..049d777 100644 --- a/Assets/Scripts/Skills/Effectors/Projectile.cs +++ b/Assets/Scripts/Skills/Effectors/Projectile.cs @@ -51,7 +51,9 @@ namespace EerieVillage.Skills.Effectors float aspect = (cam.aspect > 0.01f) ? cam.aspect : (16f / 9f); camWidth = cam.orthographicSize * 2f * aspect; } - float[] mults = { 0.2f, 0.5f, 0.667f, 1.0f, 1.5f }; + // BT12-Dev 2026-05-10 Camera ortho 3.5→5.0 정합 정정 (camWidth 12.44→17.78·1.43배). + // 기존 maxRange 동등 유지 위해 mults 1/1.43 비례 축소. + float[] mults = { 0.14f, 0.35f, 0.467f, 0.7f, 1.05f }; int idx = Mathf.Clamp((int)_data.Range, 0, mults.Length - 1); _maxRange = camWidth * mults[idx];