While doing the first tutorial, I found the following problem: onTriggerEnter would not recognize a game.object entering a trigger. The pickups have this exact tag, are triggers, and have Rigidbodies(to allow them to become dynamic objects). The sphere has a Rigidbody and Sphere Collider, and the script is attached to the sphere. I tried reinstalling Unity, but it did not help.
My code: (This is C#)
void onTriggerEnter(Collider other)
{ Debug.Log (“Triggered c”);
if (other.gameObject.CompareTag (“Pick up”))
{ other.gameObject.SetActive (false);
Debug.Log (“Triggered d”); } }
I also put Logs earlier in the script, in void.Start and void.Update, and they work fine. The debugs in this snippet don’t, however. I used the exact same script as in the tutorial, with the exception of various strings, which are irrelevant. Finally, there are no errors in the Console. I searched for other with this problem, but only found one, whose advice did not work in my case.