Fix trees not clickable when they are entities
This commit is contained in:
@@ -36,6 +36,9 @@ namespace Toria.Game
|
||||
}
|
||||
|
||||
//TEMPORARY before finding a better solution for raycasts to ignore tree (whether or not entities)
|
||||
if (GetComponentInParent<EntityData>())
|
||||
return;
|
||||
|
||||
foreach (Collider collider in GetComponentsInChildren<Collider>())
|
||||
collider.gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user