I have the following script that is supposed to detect the collision between two objects (BoxCollider2D is a trigger and CircleCollider2D is a normal collider)
public class ArcadeScore : MonoBehaviour {
public BoxCollider2D bc;
public CircleCollider2D cc;
private int score;
// Use this for initialization
void Start () {
score = 0;
}
// Update is called once per frame
void Update ()
{
if (bc.IsTouching(cc))
{
Debug.Log("collision detected");
score++;
}
}
}
But the script doesn't print anything in the console, so I was wondering if it was possible to detect a collision between a trigger and a normal collider from an external script?