Search Issue Tracker
By Design
Votes
0
Found in
2020.3.37f1
2021.3.7f1
2022.1.9f1
2022.2.0b1
2023.1.0a3
Issue ID
UUM-10235
Regression
No
SphereCast RaycastHit.point seems to be in local space rather than world space
How to reproduce:
- Open the user attached project
- Open the MyMouseLook script and place a breakpoint in line 112
- Start the debugger
- Enter Play Mode
- Zoom in and/or right-click and drag to make the camera rotate
Expected result: The cast collides with the sphere collider
Actual result: RaycastHit.point is (0, 0, 0) even though the sphere is far from it
Reproducible with: 2020.3.37f1, 2021.3.7f1, 2022.1.9f1, 2022.2.0b1, 2023.1.0a3
Reproduced on: Windows 10 (Intel)
Note: If you disable the breakpoint you will see the camera flickering, alternating its position to (0, 0, 0) for every collision
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
The RaycastHit.point is (0, 0, 0) because the SphereCast does not hit anything. The boolean return value of the method should be checked before evaluating the RaycastHit result.