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
- The Up, Down and other Buttons in a Style Sheet's Inspector unselect items when they are clicked while they are disabled
- Virtual Player remains active and still launches when removed from Additional Editor Instances from a custom Play Mode Scenario
- UI Toolkit Editor Window Creator becomes not interactable and greyed out when a long name is entered
- [Web][iOS] Web Player keeps restarting on launch when Native C/C++ Multithreading is enabled
- "Add Scene to Scenes in Build" pop-up reappears after Scene has already been added and another Multiplayer Editor Instance is loaded
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