Just a quick question about the way @sampattuzzi referenced the Player in the OnTriggerEnter:
void OnTriggerEnter(Collider other)
{
var player = GameObject.FindGameObjectWithTag("Player");
if(other.gameObject == player) {
pickup.PickupItem();
}
}
Where as I used this method:
void OnTriggerEnter(Collider other)
{
if(other.tag == "Player") pickup.PickupItem();
}
Is there a something I’m missing with mine? It works fine, but I was wondering if there was something I was missing.
Thanks so much!
Julian Boardman