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

Physics2D

-

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 (6)

  1. Cb0ae2697f69f3b71f0c3de5150d66a2?d=mm

    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.

  2. 6d6b743b63529d7bfd2cf91d8d5b571f?d=mm

    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.

  3. 47bf0374d5c46bec5c0de77c7d0ad478?d=mm

    Flaw

    Nov 30, 2015 20:21

    Also present in 5.3.0f2.

  4. Eae7409b3699c0f0a9663911ede72870?d=mm

    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...

  5. 9d5384695718e7f42cc84f62e3d2453b?d=mm

    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.

  6. 12a6070531599542d24ec64fea929da1?d=mm

    Derf321

    Nov 22, 2015 18:50

    Also present in 5.2.3f1.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.