I have a box collider around a 2D small airplane. Everything that touches the area around it of course will destroy itself…
However, everything that floats above the collider on the Y axis also destroys.
Has anyone else had this issue?
public class PlayerScript : MonoBehaviour {
void OnCollisionEnter2D(Collision2D coll) {
if (coll.gameObject.tag == "Enemy") {
Destroy(coll.gameObject);
}
}