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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
This is a duplicate of issue #UUM-41893