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
- Particle System only collides with one Terrain Collider at a time when Collision Type is set to 'World'
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
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.