Categories
Unity3d not working OnCollisionEnter2D?
void OnCollisionEnter2D(Collision2D collision) { if(collision.gameObject.name=="Fire") { Destroy(collision.gameObject); } }
Answer the question
In order to leave comments, you need to log in
Everything is working. You have problems. Either there are no colliders, or they are triggers, or they are not 2d, or something else.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question