diff --git a/Assets/Scripts/Gameplay/EnemyDeath.cs b/Assets/Scripts/Gameplay/EnemyDeath.cs index 89da4da..c5ac0d1 100644 --- a/Assets/Scripts/Gameplay/EnemyDeath.cs +++ b/Assets/Scripts/Gameplay/EnemyDeath.cs @@ -19,7 +19,11 @@ namespace Platformer.Gameplay // 충돌·이동·patrol 영역 비활성 if (enemy._collider != null) enemy._collider.enabled = false; if (enemy.control != null) enemy.control.enabled = false; - enemy.enabled = false; // BT104: EnemyController patrol 영역 정지 + enemy.enabled = false; // EnemyController patrol 영역 정지 + + // BT105 — 제자리 사망 (PD 명시 2026-05-08): Rigidbody2D simulated = false → gravity X·물리 미참여 + var body = enemy.GetComponent(); + if (body != null) body.simulated = false; // death 애니메이션 트리거 (Enemy.controller 영역의 'death' parameter) var animator = enemy.GetComponent(); diff --git a/Assets/Scripts/Mechanics/EnemyController.cs b/Assets/Scripts/Mechanics/EnemyController.cs index 1cd215d..8db23e9 100644 --- a/Assets/Scripts/Mechanics/EnemyController.cs +++ b/Assets/Scripts/Mechanics/EnemyController.cs @@ -166,16 +166,16 @@ namespace Platformer.Mechanics _lastX = transform.position.x; } - // BT103 — 정확 측정 (PD 명시 2026-05-08): Start 시점 1회 측정·간격 0.1m·Capsule 발 영역 정확 + // BT105 — 정확 측정·안전 margin 2.0m (PD 보고 떨어짐 잔존: 보수적 영역으로 절벽 도달 X 보장) float MeasureSafeWalkDistance(float dir) { if (_collider == null) return patrolMaxRange; - float groundY = _collider.bounds.min.y + 0.05f; // Capsule 발 영역 위 0.05m + float groundY = _collider.bounds.min.y + 0.05f; for (float d = 0.1f; d <= patrolMaxRange; d += 0.1f) { Vector2 origin = new Vector2(_startX + dir * d, groundY); RaycastHit2D hit = Physics2D.Raycast(origin, Vector2.down, cliffCheckDepth, groundLayerMask); - if (hit.collider == null) return Mathf.Max(0f, d - 0.5f); // 안전 margin 0.5m + if (hit.collider == null) return Mathf.Max(0f, d - 2.0f); // BT105: 0.5→2.0m } return patrolMaxRange; }