GeparD
1
Hi guys,
I am new to Unity. Just installed it and following tutorial project #00 and I at the Collecting and counting video I am told to use
void onTriggerEnter(Collider other)
{
if (other.gameObject.tag == "PickUp")
{
other.gameObject.SetActive(false);
}
}
as a script to handle displaying objects.
It is not working (objects are not disappearing when ball hits them) and I don’t know why.
Any idea?
Divinux
2
Try
void onTriggerEnter(Collider other)
{
print("Collider found");
if (other.gameObject.tag == "PickUp")
{
print("Tag found");
other.gameObject.SetActive(false);
}
}
And then we’ll check from there where your problem is.
Dantus
3
It is OnTriggerEnter with a capital O!
1 Like
GeparD
4
Dantus! You are my man! Thanks a lot 
GSteele
5
Thanks Dantus, I had the same issue.
Also thanks @Divinux you helped teach me to step through each part and see what is going on.
1 Like