Search Issue Tracker
Duplicate
Votes
0
Found in
2022.3.5f1
2023.1.3f1
2023.2.0a23
Issue ID
UUM-42567
Regression
No
RaycastCommand throws assertion errors when the Raycast Direction is other than Vector3.forward
How to reproduce:
1. Open the user-attached project “2023.1 Bug Reports Project”
2. Open the "RaycastCommandBug" scene
3. Enter the Play Mode
4. Select the “RaycastCommandBug” GameObject in the Hierarchy
5. In the Inspector, under the “Raycast Command Test” Script Component change the “Direction” field to 0, 0, 2
6. Enable the Script Component and observe the Console
Expected result: The Script runs correctly and doesn’t throw any errors
Actual result: There are assertion errors
Reproducible with: 2022.3.5f1, 2023.1.3f1, 2023.2.0a23
Couldn’t test with: 2021.3.28f1 (Scripts can’t be compiled)
Reproducible on: Windows 11 Pro
Full error:
Assertion failed on expression: 'IsNormalized(Vec3FromPx(direction))'
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Unity.Jobs.JobHandle:Complete ()
RaycastCommandTest:OnEnable () (at Assets/RaycastCommandTest.cs:33)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
-
Resolution Note:
Currently, the direction specified for the batch queries should be normalised before usage. Valid examples could be (1, 0, 0), or (0, 1, 0), as well as many others that are unit length.
Duplicate of https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-41893
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
- “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
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
This is a duplicate of issue #UUM-41893