Search Issue Tracker
By Design
Votes
8
Found in
5.0.1f1
Issue ID
691389
Regression
No
OnCollisionEnter2D is not called on every collision
Steps to reproduce:
1. Open attached project's scene "scene".
2. Open Listener script, in OnCollisionEnter2D include Debug.Log("Collided"), in OnTriggerEnter2D include Debug.Log("Triggered").
3. Play the scene.
4. Count of number of triggers is around 2-3 times higher then number of collisions.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Ruskul
Apr 27, 2015 20:54
It isn't just "OnCollisionEnter2D" that is broken. To see this, try throwing a test script onto and object ("ObjA") that has print outs for all the trigger and collision methods. Create an Obj B. Add colliders to both objects.
If you test every match up (static, dynamic, kinematic) you can see how only a dynamic object interacting with a static object accurately reports all Enter/Exit/Stay. Trigger2Ds also report badly in the same ways.
I have used box2d extensively in other projects. It's not that hard to implement. Freeware game engines (love, for example) don't have problems of this magnitude. Even game engines like construct 2 don't have blaring bugs in their physics like this (and when they do I can edit the source). This bug is inexcusable and I would be ashamed for shipping the 2d physics in the state that it is in. Did nobody run unit tests, or am I just missing something???