Search Issue Tracker
Duplicate
Duplicate in 2023.2.X
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 -
Resolution Note (2023.2.X):
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
- Invalid Clip Method
- WebGPU error with Fantasy Kingdom and GPU Resident Drawer
- WebGPU fails with height fog in Fantasy Kingdom
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
This is a duplicate of issue #UUM-41893