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
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Different text alignment in the column header in Entities "System" window
- Objects with Universal Render Pipeline/Particles/Lit shader are always lit up when changing their Rendering Layer Mask
This is a duplicate of issue #UUM-41893