Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4
2020.2
2020.2.2f1
2021.1
2021.2
Issue ID
1311101
Regression
No
Rigidbody2D.Distance is returning incorrect results when used between a Capsule Collider 2D and a rotated Box Collider 2D
How to reproduce:
1. Open the attached project (case_1311101-DistanceTest)
2. Open the DistanceTest Scene
3. Move the Collision Game Object around to see the expected behavior
4. Move the Collision Game Object to the (0, 0) position
Expected result: You can see the correct separation of the colliders
Actual result: The separation of the colliders is not visible
Reproducible with: 2018.4.30f1, 2019.4.19f1, 2020.2.5f1, 2021.1.0b7, 2021.2.0a4
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
- [URP][XR] Spotlight shadows flicker when Deffered Rendering Path is selected and rotating the HDM view in XR
- Scene view audio toggle doesn't work after disabling and enabling audio source component with audio random container
- Pitch changes while paused messes up scheduling of the audio random container
- Crash on detail::ComputeShaderSnippetKey when entering the Play mode
- Unable to interact with Material Inspector window when creating a new Material and renaming it
Resolution Note:
The basic solver that the script is performing does not take tiny floating-point errors into account. It produces a tiny overlap of "-0.0000000596046448" (effectively 59 nanometers) and it's negative. The script then continues to try to solve that but it just can't because it's way below the precision here.