Search Issue Tracker
By Design
Votes
0
Found in
5.6.0f3
Issue ID
913600
Regression
No
Physics2D.Distance returns incorrect distance between colliders
To reproduce:
1. Open the project, attached by user (ColliderDistance2D_Bug.zip)
2. Open the "Scene" scene if not open
3. Move the capsule around inside pentagon
4. Observe the distance shown by white line
Expected: points and distance between the points are calculate correctly by Physics2D.Distance
Actual: Physics2D.Distance returns incorrect distance between the CapsuleCollider2D and PolygonCollider2D, when the capsule's origin point is inside the polygon
Reproduced in 5.6.0f3, 5.6.1p1, 2017.1.0b6, 2017.2.0a1
Could not test for regression, because Physics2D.Distance was introduced only in 5.6
By design: When calling the Distance function, it gives you a solution for a single step only. In a lot of cases, that will solve an overlap but as the cases get more complex, multiple iterations are needed.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
- Incorrect warning icon and wrong message displayed in HDRP Decal Projector
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
Add comment