Search Issue Tracker
Fixed in 2020.1.X
Fixed in 2019.2.X, 2019.3.X
Votes
0
Found in
2019.1.3f1
2019.2.0b1
2019.2.5f1
2019.3.0a1
2020.1
Issue ID
1190643
Regression
Yes
[2D] CompositeCollider2D polygon generation is inconsistent when using tilemaps
How to reproduce:
1. Open the attached project ("case_1190643-UnityCollisionBug.zip")
2. Open the repro scene ("SampleScene)
3. Select the tilemap grid in the scene and inspect it's generated collider
4. Open a tile palette
5. Add an extra red square to the right of another red tile in the scene
6. Notice the newly added edge in the collider
7. Turn the "Tilemap Collider 2D" component off and on again
8. Inspect the colder in the scene
Expected results: The geometry remains the same
Actual results: The newly added edge is removed
Reproducible with: 2019.1.3f1, 2019.1.11f1, 2019.2.0b1, 2019.2.10f1, 2019.3.0b8, 2020.1.0a9
Not reproducible with: 2017.4.33f1, 2018.4.11f1, 2019.1.2f1, 2019.1.0a1, 2019.2.0a14
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
- [Linux] Dropdown Menus are filled with empty entries when the Menu intersects with the Editors borders
- [HDRP] [Metal] Tiled artefacts when using DRS
- [HDRP] Empty template starts with incorrect Physically Based Sky ground
- Big chunk of "Untracked" memory in the Memory Profiler screenshot when a custom .obj file is loaded while in Play Mode
- Video contains artifacts when played in the Video Preview section in the Inspector Window
Resolution Note (fix version 2020.1):
The unstable collision-detection was caused by Box2D allowing a degerate polygon through. In this case it was a triangle whose vertices were fractionally off being collinear but still producing an extremely small area. Adding in a more robust near-collinear vertex check solves this issue. Fixing the "consistency" of tilemaps colliders would require a fundamental change in how authoring incremental changes works, and is not addressed in this fix.
Fixed in: 2019.2.14f1, 2019.3.0b13, 2020.1.0a15