Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2021.1.X, 2021.2.X
Votes
1
Found in
2019.4
2019.4.12f1
2020.3
2021.1
2021.2
2022.1
Issue ID
1354786
Regression
No
Physics2D.Distance returns zero when CapsuleCollider has a size of (0.1, 0.1)
Steps to reproduce:
1. Download and open the project "UnityBug_Collider_Distance_with_Capsule.zip"
2. Open Assets/Scenes/SampleScene.unity
3. Enter Play Mode and switch to Scene View
4. In the Inspector tab, click on "Collider Distance Tester (BUG)" GameObject
5. Notice that the Distance in the "Collider DIstance Tester (Script)" component shows zero
6. Click on the "Capsule" GameObject under "Collider Distance Tester (BUG)" GameObject
7. Change the Size of Y to 0.2
8. Repeat Steps 4 and 5
Expected result: The Physics2D.Distance of the CapsuleCollider with size (0.1, 0.1) is not zero
Actual result: The Physics2D.Distance of the CapsuleCollider with size (0.1, 0.1) is zero
Reproducible with: 2019.4.29f1, 2020.3.15f1, 2021.1.17f1, 2021.2.0b6, 2022.1.0a5
Note:
The issue only occurs when both X and Y values are 0.1
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
- Duplication of an asset in the Project view is continued for some time when holding and releasing CTRL+D
- "Failed to create Convex Mesh from source mesh" PhysX errors are thrown when looking around the Scene View while Collision Geometry is set to true
- ScrollView is not taking Into account header height when handling mouse wheel scrolling in MultiColumnTreeView
- Build fails with "Shader error in 'BK/StandardLayered" when using a custom shader
- Crash on SkinnedMeshRenderer::UpdateSkinnedMeshes when interacting with the Editor in a specific Scene
Resolution Note (fix version 2022.1):
A fix for this issue is available on Unity 2022.1.0a7 and above
Resolution Note (fix version 2021.2):
A fix for this issue is available on Unity 2021.2.0b12 and above
Resolution Note (fix version 2021.1):
A fix for this issue is available on Unity 2021.1.22f1 and above