Search Issue Tracker
Won't Fix
Votes
1
Found in
2020.3.47f1
2021.3.23f1
2022.2.15f1
2023.1.0b12
2023.2.0a10
Issue ID
UUM-33791
Regression
No
RaycastCommand documentation needs to be updated.
Raycast command docs need updating, from the Fogbugz entry:
"I know the issue is old and closed, but can the documentation please be updated and mention that multiple hits per ray are not supported? "The documentation simply doesn't explain this very well." is a huge understatement - the documentation<https://docs.unity3d.com/ScriptReference/RaycastCommand.html> literally mentions how to use the maxHits parameter, and how to get the additional hits from the result.
I've spent a great deal of time troubleshooting my code and trying to figure out why it isn't working, only to eventually find this issue that it was never supposed to work at all. Since it was my first time working with Jobs and Commands, I wasn't really confident in my code and it made the whole learning process a lot harder.
If the feature is already implemented and there indeed was some unsolved issue on my end, I apologize - I can't confidently say that I did everything properly, but my debugging results seem to indicate that the behavior is still as described here - that it only supports the first hit.
Due to the plainly wrong and missleading documentation, I've spent a lot of development and learning time wasted on a feature that I can't use, since it can't do what I need, and the RaycastCommand with multiple hits was the only reason I started implementing Jobs into my project. If it wasn't mentioned in the documentation that it supports multiple hits, I'd have looked elsewhere and saved a lot of time. And I'm sure I'm not the only one who encounters this issue in the last 5 years since this bug report, so for the sake of future developers stumbling onto this API call, can the documentation please be updated to mention this?"
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
- Crash on when D3D12RenderPass::SetupDeviceResources when opening FBX animation preview
- Serialization errors are thrown when "com.unity.render-pipelines.core" is added as a custom package and Graphics window is opened
- Character Joints unexpectedly rotate when a ragdoll is created using the Ragdoll Wizard
- Crash on GfxDeviceD3D11Base::DrawBuffersBatchMode when rendering the Scene view
- The shared EditorBuildSettings.asset file of symlinked projects is not updated when changing the order of the Scenes in Build Settings in one of the projects
Resolution Note:
Fixed, RaycastCommand will return as many hits as you define in maxHits for RaycastCommand.ScheduleBatch(). See more on documentation page: https://docs.unity3d.com/ScriptReference/RaycastCommand.html
Tested in 2023.3.0a17