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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.