From 412dedb7bc8e1277bd05b89a7c148955114a2ca6 Mon Sep 17 00:00:00 2001 From: swrring Date: Mon, 18 May 2026 19:46:20 +0900 Subject: [PATCH] =?UTF-8?q?fix(BT12-Dev-Clone):=20=EB=B6=84=EC=8B=A0=20?= =?UTF-8?q?=ED=88=AC=EC=82=AC=EC=B2=B4=20=EB=B0=A9=ED=96=A5=20=EC=A0=95?= =?UTF-8?q?=ED=95=A9=20+=20Player=20=EC=82=AC=EB=A7=9D=20=EC=8B=9C=20?= =?UTF-8?q?=EB=B6=84=EC=8B=A0=20=EC=A6=89=EC=8B=9C=20destroy=20(PD=20?= =?UTF-8?q?=EC=A7=80=EC=8B=9C=202026-05-18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 보고 2건: 1. 분신 영역 투사체 영역 영역 영역 영역 영역 X 원인: _spawnFacingX 영역 spawn 시점 영역 영역 영역 → Player facing 변경 후 분신 발동 시 영역 영역 영역 영역 영역 영역 fix: SyncSpriteAndPosition 영역 매 frame _spawnFacingX 영역 영역 영역 (pc.Facing 영역) → 분신 발동 시 CloneFireFacingX = _spawnFacingX (영역 영역 영역 영역) → 투사체 정합 영역 PD 결정 4번 (facing 고정) 영역 — 분신 영역 영역 영역 영역 영역 영역 영역 (시각 영역 영역 영역 — 직전 fix 영역 영역) → facing 영역 영역 영역 2. Player hit·death 영역 분신 영역 영역 영역 (잔존 현상) 원인: CloneInstance.Update 영역 lifetime 12초 영역 영역 영역 → Player 영역 영역 영역 영역 분신 영역 fix: Update 영역 매 frame Health.IsAlive 영역 영역 → false 영역 분신 즉시 Destroy(gameObject) + _playerInventory == null 영역 영역 destroy (Player.gameObject Destroy 영역 영역) MCP 검증: refresh_unity + read_console errors 0 --- .../Scripts/Skills/Effectors/CloneInstance.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Skills/Effectors/CloneInstance.cs b/Assets/Scripts/Skills/Effectors/CloneInstance.cs index ff18485..bda07e5 100644 --- a/Assets/Scripts/Skills/Effectors/CloneInstance.cs +++ b/Assets/Scripts/Skills/Effectors/CloneInstance.cs @@ -191,6 +191,19 @@ namespace EerieVillage.Skills.Effectors return; } + // PD 지시 2026-05-18 — Player 영역 영역 영역 영역 분신 즉시 destroy (영역 영역 영역 X) + if (_playerInventory == null) + { + Destroy(gameObject); + return; + } + var playerHealth = _playerInventory.GetComponent(); + if (playerHealth != null && !playerHealth.IsAlive) + { + Destroy(gameObject); + return; + } + // BT12-Dev-Clone (2026-05-18) — 매 frame Player sprite 동기화 + 위치 영역 영역 영역 SyncSpriteAndPosition(); @@ -218,15 +231,16 @@ namespace EerieVillage.Skills.Effectors // 2. PD 지시 2026-05-18 — 목표 위치 영역 = Player worldPos + facing 반대 0.5 영역 (50% 영역) // SetParent X · 독립 GameObject 영역 — Player.localScale 영역 영역 영역 영역 영역 영역 영역. + // PD 지시 2026-05-18 — _spawnFacingX 매 frame 영역 영역 (Player facing 영역) → 분신 발동 시 투사체 영역 정합 영역. Vector3 playerWorldPos = _playerInventory.transform.position; - float signX = 1f; var pc = _playerInventory.GetComponent(); if (pc != null) { Vector2 facing = pc.Facing; if (facing.sqrMagnitude > 0.01f) - signX = facing.x < 0f ? -1f : 1f; + _spawnFacingX = facing.x < 0f ? -1f : 1f; // 매 frame Player facing 영역 영역 갱신 } + float signX = _spawnFacingX; _targetLocalPos = playerWorldPos + new Vector3(-signX * SPAWN_OFFSET_X, 0f, 0f); // worldPos target // 3. 영역 영역 영역 영역 영역 영역 영역 (MoveTowards · worldPos 기반)