전장의 안개 기능 개선
미탐험 구역의 모든 오브젝트는 보이지 않음 적이 시야를 제공하는 문제 수정 높은 장애물은 더 먼 거리에서부터 보일 수 있음
This commit is contained in:
@@ -254,6 +254,14 @@ namespace Northbound
|
||||
obstacle.transform.localScale *= scale;
|
||||
}
|
||||
|
||||
// Add FogOfWarVisibility component to hide obstacles in unexplored areas
|
||||
if (obstacle.GetComponent<FogOfWarVisibility>() == null)
|
||||
{
|
||||
var visibility = obstacle.AddComponent<FogOfWarVisibility>();
|
||||
visibility.showInExploredAreas = false; // Obstacles hidden when not visible
|
||||
visibility.updateInterval = 0.2f;
|
||||
}
|
||||
|
||||
_spawnedPositions.Add(randomPos);
|
||||
Debug.Log($"<color=green>[Spawn] 장애물 배치 성공: {obstacleEntry.prefab.name} at {randomPos}</color>");
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user