건물 Ghost가 다른 오브젝트와 충돌하여 밀어내지 않도록 함

This commit is contained in:
2026-02-13 15:36:59 +09:00
parent a85f4d8fed
commit e2c40827bf

View File

@@ -312,6 +312,12 @@ namespace Northbound
collider.enabled = false; collider.enabled = false;
} }
// Disable NavMeshObstacles in preview (they act as obstacles for NavMeshAgent)
foreach (var obstacle in previewObject.GetComponentsInChildren<UnityEngine.AI.NavMeshObstacle>())
{
obstacle.enabled = false;
}
Debug.Log($"[BuildingPlacement] 프리뷰 생성됨: {data.buildingName}"); Debug.Log($"[BuildingPlacement] 프리뷰 생성됨: {data.buildingName}");
} }
@@ -528,6 +534,12 @@ namespace Northbound
collider.enabled = false; collider.enabled = false;
} }
// Disable NavMeshObstacles in preview (they act as obstacles for NavMeshAgent)
foreach (var obstacle in preview.GetComponentsInChildren<UnityEngine.AI.NavMeshObstacle>())
{
obstacle.enabled = false;
}
dragPreviewObjects.Add(preview); dragPreviewObjects.Add(preview);
if (isValid) if (isValid)