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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
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.