Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2019.4.19f1
2020.2
2021.1
2021.2
Issue ID
1311563
Regression
No
Collisons not ignored when Physics2D.SetLayerCollisionMask is set
How to reproduce:
1. Open the user's attached project
2. Enter Play mode
3. Try to walk through a door
Expected results: You're able to walk through the door and wall when the door's trigger is entered because then Physics2D.SetLayerCollisionMask is set to ignore collisions between Player and Environment layers
Actual results: You're not able to walk through the door because when Physics2D.SetLayerCollisionMask is used, the collisions are not ignored
Reproducible with: 2019.4.20f1, 2020.2.5f1, 2021.1.0b7, 2021.2.0a6
Could not test with: 2018.4.32f1 (Errors downgrading)
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
Changing the layer collision matrix via code only changes new contacts and doesn't go over all existing contacts and re-evaluate them because they would become very expensive on larger projects.
To force re-evaluation of contacts you can use Rigidbody2D.simulated by toggling it off/on in script.