Bug on physic2D layers ?

Hi
I 'm using unity p2D physics, and i got a big bug. When i disable collision between some layers, some objets dont colides anymore with some other layers.

here i have a project. with some sprites. i have Pink , on the pink layer, and blue on the blue layer.
the pink sprites have a rigidbody and a box collider (2D)
the blue just have a Box collider (2D)

If i dont change anything in the physics2D settings, everyting work fine:
look :


If i disable the pink sprite collision with other pink sprites, I got this :
Some squares work fine, some squares collide with the bottom blue, some squares dont collide with anything…


I have attached the project file " 2DBugLayer.rar"

1420325–74729–$2DBugLayer.rar (93.4 KB)

You should submit this as a bug report to Unity. That’s a pretty big problem.

I don’t get the same result when I import your project into my Unity. Are you using Unity 4.3.0f4? It said I had to upgrade your project upon import so I’m not sure what’s the issue.

Where I can find Layer Collision Matrix?

Physics Manager: Edit->Project Settings->Physics2D

I seem to have found a related bug:
Using 2D Physics, I setup a floor and a cube to fall to the floor as soon as I hit play on the scene.
When I hit play, they collide and the cube stops - all is well.
If I reset the scene, change the layer of the cube to one that is not set to collide in the 2D Layer Collision Matrix, and hit play, it passes through the floor. Again, all is well.

Now here’s the bug.
If I set the cube to collide, let it drop, then set it not to collide AFTER it hits the floor and stops moving, it will NOT pass through the floor unless I give it a nudge somehow. (I change the collision by switching layers on the cube)

Is this a bug, or am I missing something?

What is the sleeping mode set to on the cube?

I had the same issue. I tried changing rigidbody2d to never sleep and to continuous collision detection but it wouldn’t fall through until I moved. I found the only way to have it work was to disable and enable my collider2d.

layer=LayerMask.NameToLayer("PlayerClip");
collider2D.enabled=false;
collider2D.enabled=true;

Dirty hack but its the only thing I found that works so far.

it works! great help! Thanks!