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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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.