I am trying to make an object that upon collision with another object, gets destroyed. I have also used Debug.Log and it turns out that the collision is not even detected. Here is the code
public class Enemy_1 : MonoBehaviour
{
public void OnCollisionEnter2D(Collision2D col)
{
if (col.gameObject.tag.Equals ("AttackArea"))
{
Destroy(gameObject);
}
}
}
Rigidbody2Dcomponents andCollider2D? - derHugoContinuous. Also, the Havok Physics is supposed to be faster. That might be fun to try. - jiveturkeycol.gameObject.CompareTag("AttackArea")to avoid silent fails for typos - derHugo