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
- Errors are logged when importing an asset at a path with Firebase
- Entering too big of a number in 2D Renderer Lightmode Tags freezes the Editor
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
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