From 8df09a7feb136e2eb48abb63cb46c38e2b386988 Mon Sep 17 00:00:00 2001 From: swrring Date: Fri, 8 May 2026 01:05:32 +0900 Subject: [PATCH] =?UTF-8?q?BT5-Dev=20#79:=20Enemy=20flipX=20=EC=98=81?= =?UTF-8?q?=EC=97=AD=20PlayerController=20=EC=A0=95=ED=95=A9=20(PD=20?= =?UTF-8?q?=EB=AA=85=EC=8B=9C=20=EC=B1=84=ED=83=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PD 명시 (2026-05-08): "몬스터도 캐릭터와 같이 리소스를 반대로 재생시켜야 해" 근본 원인: - AnimationController.cs (Enemy 영역) flipX 영역: - 우측 이동 시 flipX = false - 좌측 이동 시 flipX = true - PlayerController.cs (Hero1 영역) flipX 영역: - 우측 이동 시 flipX = true - 좌측 이동 시 flipX = false - = 반대 영역. M001 sprite (좌측 향함) 기준 Enemy 영역 우측 이동 시 sprite 그대로 = 후방 이동 영역. 정정 (true·false 반전): - 우측 이동 시 spriteRenderer.flipX = true - 좌측 이동 시 spriteRenderer.flipX = false - = PlayerController·Hero1 영역과 동일 영역 정합 PD 추가 보고 진단 (첫 번째 등장 몬스터 정지): - Scene Enemy prefab 인스턴스 16개 중 5개 path 미설정 (#3·#9·#11·#13·#14) - path null = mover null = move.x = 0 = 정지 - pos.x 카탈로그: #13(7.79·path=0) #3(24.49·NO_PATH) #14(42.91·NO_PATH) #11(82.28·NO_PATH) #9(139.27·NO_PATH) - = PD 시각 첫 번째 등장 = pos.x 가장 작은 영역 가설 (#13 또는 #3) - 정정 영역 = PD가 Editor에서 path 영역 직접 부여 의무 (PatrolPath GameObject Inspector 영역 drag·drop) --- Assets/Scripts/Mechanics/AnimationController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Mechanics/AnimationController.cs b/Assets/Scripts/Mechanics/AnimationController.cs index ea496db..2c7c67c 100644 --- a/Assets/Scripts/Mechanics/AnimationController.cs +++ b/Assets/Scripts/Mechanics/AnimationController.cs @@ -62,10 +62,11 @@ namespace Platformer.Mechanics } } + // PD 명시 2026-05-08 — PlayerController와 동일 영역 정합: 좌측 향한 sprite 기준 우측 이동 시 flipX=true if (move.x > 0.01f) - spriteRenderer.flipX = false; - else if (move.x < -0.01f) spriteRenderer.flipX = true; + else if (move.x < -0.01f) + spriteRenderer.flipX = false; animator.SetBool("grounded", IsGrounded); animator.SetFloat("velocityX", Mathf.Abs(velocity.x) / maxSpeed);