Hello! I have encountered lots of problems with colliders in Unity. I have a 2D project and I want a object to act upon touching or, colliding. I am just testing to see if it does anything, and the code that I have is correct; I have confirmed it with many sources and books. It doesn’t seem to do anything though. I have created its own script for itself so it shouldn’t be because of the code. Here is the code that I have:
void OnTriggerEnter(Collider other){
Debug.Log ("This better work.");
if(other.gameObject.tag == "Player"){
CoinFall.Touching = true;
}
}
Why is this not working? They are in the same z plane and they are touching each other, though it never responds.
Help?
Thanks!
-Jack