Search Issue Tracker
Fixed in 5.3.5
[ContinuousCollisionDetection] If multiple collisions happen in one update, OnCollisionEnter2D is only called for the last one
Steps to reproduce:
1. Open attached project
2. Open scene "sc_gameplay"
3. Notice that "pr_ball" has "Collision detection" set to "Continuous"
4. Notice that "Assets/prefabs/pr_brick" has "Collision detection" set to "Discrete"
5. Run scene and press press left mouse button to shoot the ball
6. Notice that when "pr_ball" touches "pr_brick" OnCollisionEnter2D doesn't get called (attached gif)
Note: If we attach "Assets/ScBrick" script to "wall_left" and repeat step 5 then, on collision, the wall gets destroyed. It seems that if multiple collisions happen in one update then OnCollisionEnter2D is called only for the last collision.
1. Set "Collision detection" of "pr_brick" to "Continuous"
2. Set "Collision detection" of "pr_ball" to "Discrete"
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Vulkan] Wrong aspect ratio in fullscreen of Standalone build when selected screen resolution is not native
- [Mac] Crash on ioAccelResourceListAddNewGroupAndResource when importing a large COLLADA model
- Prefab referenced Game Object is not removed from the Scene files when the reference field gets deleted
- Unity crashes on GC_grow_table when trying to deserialize an XML file
- [Build Callbacks] Build is not failing when BuildFailedException is thrown in the PostProcessScene Callback