Question by
Busil · Jan 02, 2016 at 01:59 PM ·
collider2dcollision2d
OnCollisionEnter2 problem.
void OnCollisionEnter2D (Collision2D col)
{
Debug.Log ("hi");
}
I have no idea why this code is not working. Both of my objects have collider2D.
Any ideas? Thanks for help.
Comment
Can you show your entire script, post a screenshot of the collider settings, and give the error message from the console?
Answer by dreamhex · Jan 02, 2016 at 11:57 PM
Make sure you have a ridigidbody2d attached to one of the objects.
Your answer
Follow this Question
Related Questions
OnCollisionExit2D no longer gives contact information 0 Answers
OnCollisionEnter2D is not being called 0 Answers
2d balls stuck in box colliders 1 Answer
Collision not working 1 Answer
2D sprite won't destroy on collision 0 Answers