diff --git a/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs b/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs index 8f1cadb..c23deb1 100644 --- a/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs +++ b/Assets/Scripts/Skills/Effectors/PoisonSwampSpawner.cs @@ -35,14 +35,23 @@ namespace EerieVillage.Skills.Effectors if (e == null) continue; var h = e.GetComponent(); if (h == null || !h.IsAlive) continue; + // PD 지시 2026-05-15 — 공중 몬스터 (박쥐 등) skip · 독 늪 ground spawn 의도 + if (e.IsFlying) continue; var p = e.transform.position; if (p.x < camPos.x - halfW || p.x > camPos.x + halfW || p.y < camPos.y - halfH || p.y > camPos.y + halfH) continue; float d = Vector2.Distance(playerPos, p); if (d < minDist) { minDist = d; nearest = e; } } - Vector2 spawnPos = nearest != null ? (Vector2)nearest.transform.position : playerPos; - spawnPos += data.OffsetXY; + Vector2 candidate = nearest != null ? (Vector2)nearest.transform.position : playerPos; + candidate += data.OffsetXY; + + // PD 지시 2026-05-15 — ground Raycast 영역 ground 영역 영역 spawn (공중 spawn 차단) + // groundLayerMask = Layer 0 (Level Tilemap) + Layer 16 (Floating 발판) + int groundLayerMask = (1 << 0) | (1 << 16); + RaycastHit2D groundHit = Physics2D.Raycast(candidate, Vector2.down, 20f, groundLayerMask); + if (groundHit.collider == null) return; // ground 미검출 — spawn 차단 + Vector2 spawnPos = new Vector2(candidate.x, groundHit.point.y); // 독 늪 GO spawn (OnHitFxPrefab = FX_Venom_Swamp) GameObject swampGo;