OnCollisionExit2D no longer gives contact information
Up to 5.5.0f3, Unity gives us contact information in Collision2D
parameter of OnCollisionExit2D
, however, it doesn't in Unity 5.6.1f1.
I don't know whether it's a bug or an intended behavior. There's a test project to reproduce the problem.
Reproduce steps:
Open the Attachment Project in 5.6.1f1
Open the "Test" scene
Run
After falling the cube on the ground, Console prints "collision.contacts.Length: 0" (while it should be 1 not 0)
If you follow the same steps as above in 5.5.0f3 and prior versions the console prints "collision.contacts.Length: 1" which is expected.
Your answer
Follow this Question
Related Questions
Physics 2D with tile collider corner problem 2 Answers
Confusing Interactions Between 2D Colliders 0 Answers
Hit from kinematic rigidbody2d 1 Answer
how to make force inversely proportional to the distance 0 Answers
Cannot create a 2D collider array 4 Answers