건물 Ghost가 다른 오브젝트와 충돌하여 밀어내지 않도록 함
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user