Why is my OnCollisionEnter2D only gets called only once
I have two objects in my scene, one which only has a BoxCollider2D and the second object has a Rigibody2D as well as its own BoxCollider2D. I added a script to the first object to have an OnCollissionEnter2D. I see it gets triggered when my second object collide with it and it bounce my 2nd object back when it tries to enter. I do see my OnCollisionEnter2D method getting call. But now I move my 2nd object again to my first object and indeed it gets bounce back again, however I don't see my OnCollisionEnter2D method getting call the 2nd time. Is this intended? If so, what method would get called every time a collision occurs between these two objects?
I also observed that OnCollisionExit2D never got called. Also OnCollisionStay2D was called for a few times then stopped, I assume those calls were during the time where it bounced my 2nd object back. I also tried to add a Rigibody2D to the first object but don't see any differences. Is there something that I'm missing?
Your answer
Follow this Question
Related Questions
How to set a tag to a collision? 0 Answers
why is the rigidbody's velocity zero in OnCollisionEnter2D? 1 Answer
OnCollisionEnter2D is not detecting 1 Answer
2D Game - Get collider name 1 Answer