I'm making a 2D sidescrolling game in Unity where the player shoots at obstacles while running. But nothing I try seems to get the collision detection to work. This is the obstacle script:
void onCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag == "circle")
Destroy (gameObject);
}
the circle tag refers to the projectile being shot at the obstacle