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
- Duplicate External Textures start appearing when a Texture created with "CreateExternalTexture" is modified causing Memory Usage spikes on VisionOS
- Silent crash when using a "Blend Shape" in a "Skinned Mesh Renderer" to move vertices to Vector3.positiveInfinity, and "Occlusion Culling" is baked
- Some Prefab Source and Override content bounds are misaligned
- The Package Manager's "install packages by..." panels break when Domain Reload is triggered, and the panel is open
- Crash with multiple stack traces when leaving a docked VFX Graph open
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.