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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.