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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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???