Search Issue Tracker
Won't Fix
Votes
1
Found in
2017.4
2019.3.11f1
2020.2
Issue ID
1243885
Regression
No
Tilemap Collider 2D doesn't generate Colliders for Sprites when at least one of their dimensions is 1 pixel
How to reproduce:
1. Open the attached "1243885 repro" project
2. Open the "SampleScene" from Assets > Scenes folder
3. Change the Shading mode of the Scene view to Wireframe
4. Select "Grid" from the Hierarchy window
Expected result: all 3 Sprites in the Grid have a Collider
Actual result: 1x1 and 1x2 Sprites in the Grid don't have a Collider
Reproducible with: 2017.4.40f1, 2018.4.23f1, 2019.3.14f1, 2020.1.0b9, 2020.2.0a11
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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note:
There is a limitation in the algorithm that determines the sprite mesh outline which isn't only limited to 1x1 texel. This "initial guess" at an outline should always be edited by the user because it is a rough approximation only and can either be too crude or too complex but sometimes acceptable. In this instance, it's a limit of the algorithm. The issue is not with physics but with the sprite mesh generation code that the physics shape shares. The issue is not related to Tilemap but applies to PolygonCollider2D, TilemapCollider2D etc.
The 2D team feel the risk is too great to make significant modifications to allow this edge-case to be caught. It's recommended that the user edit the physics shape in the Sprite Editor.