Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.4
2019.4.15f1
2020.2
2021.1
2021.2
Issue ID
1315339
Regression
No
A Raycast to the point of Collider.ClosestPoint will yield inconsistent hit/miss results when ray is parallel to the Collider
How to reproduce:
1. Open the attached project (case_1315339-RaycastClosestPoint)
2. Open DebugSampleScene
3. Click Play
4. Observe what is printed on the Console
5. Change the Z Position of the CubeTest object from -4 to 4
6. Observe Console
Expected result: The Collider is still being hit
Actual result: The Collider is no longer hit
Reproducible with: 2018.4.32f1, 2019.4.21f1, 2020.2.6f1, 2021.1.0b8, 2021.2.0a6
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
- Flickering bright white dots in the Scene when the Android Platform is selected and DX11 Graphics API is used with Iris(R) Xe Graphics GPU
- Inconsistent capitalization and misaligned text in multiple query blocks in Search window
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
This is an issue with floating point precision in the PhysX SDK itself, caused by the rotation of the object. The returned closest point if off by around 7.2e-7 and because the Raycast is parallel, it misses the Collider.
The issue can be worked around by not introducing any rotation to the object and instead producing the desired box shape via the Transform Scale.