Search Issue Tracker
Fixed in 5.3.5
Votes
41
Found in
5.0.2f1
Issue ID
698787
Regression
No
[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.
Workaround:
1. Set "Collision detection" of "pr_brick" to "Continuous"
2. Set "Collision detection" of "pr_ball" to "Discrete"
Comments (7)
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
360sages
Dec 04, 2015 10:38
I have the same problem. I'm still using 5.2.2f1 - the last version without this ugly bug.
gigaherz
Dec 02, 2015 15:11
It baffles me that they even allowed this to change at all between 5.2.2 and 5.2.3. It feels like minor patches should never ever touch anything that could affect the behaviour of the engine in such a way as this. Crashes, sure, firx them all. But if things were firing multiple times in 5.2.2, they should still fire multiple times in 5.2.3, IMO.
Flaw
Nov 30, 2015 20:21
Also present in 5.3.0f2.
ferruccio
Nov 24, 2015 10:44
It's pretty crazy that this is not taken seriously. It breaks one of the most basic functionalities of the whole engine...
manny003
Nov 23, 2015 16:26
This is a serious issue -- and I'm not sure the workaround works in all cases.
I currently have collision between continuous and discrete objects and the event is still not firing. They're not currently very fast moving objects so I can only image the issue getting worse if things speed up.
Derf321
Nov 22, 2015 18:50
Also present in 5.2.3f1.