Obi Official Forum
Help "Look rotation viewing vector is zero" Error Message - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help "Look rotation viewing vector is zero" Error Message (/thread-3697.html)



"Look rotation viewing vector is zero" Error Message - DragonControl - 14-12-2022

I keep getting the following error message and I don't know what I'm doing to cause it or how to avoid it:

Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3)
Obi.ObiRopeCursorEditor:DrawGizmos (Obi.ObiRopeCursor,UnityEditor.GizmoType) (at Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs:91)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


RE: "Look rotation viewing vector is zero" Error Message - josemendez - 15-12-2022

(14-12-2022, 09:18 PM)DragonControl Wrote: I keep getting the following error message and I don't know what I'm doing to cause it or how to avoid it:

Look rotation viewing vector is zero
UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3)
Obi.ObiRopeCursorEditorGran sonrisarawGizmos (Obi.ObiRopeCursor,UnityEditor.GizmoType) (at Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs:91)
UnityEngine.GUIUtilityLenguarocessEvent (int,intptr,bool&)

Hi!

My guess would be there's multiple particles in the rope that exactly overlap each other. In theory, it should be impossible for this to happen in a rope, so no idea how it got to happen.

This error is thrown when Unity tries to calculate the view direction from one point to another, but both points are the same, so it's impossible to calculate a direction from a point to itself. When drawing gizmos for the cursor, the view direction is calculated to draw the cursor gizmo using the correct orientation.

Try folding the ObiRopeCursor component in the inspector, or disable gizmos for it (in the Scene view's Gizmos menu). This will stop drawing the cursor gizmo and the error should go away. If it does not, would it be possible for you to share a bit more info about your use case/setup?

kind regards


RE: "Look rotation viewing vector is zero" Error Message - DragonControl - 15-12-2022

(15-12-2022, 09:01 AM)josemendez Wrote: Hi!

My guess would be there's multiple particles in the rope that exactly overlap each other. In theory, it should be impossible for this to happen in a rope, so no idea how it got to happen.

This error is thrown when Unity tries to calculate the view direction from one point to another, but both points are the same, so it's impossible to calculate a direction from a point to itself. When drawing gizmos for the cursor, the view direction is calculated to draw the cursor gizmo using the correct orientation.

Try folding the ObiRopeCursor component in the inspector, or disable gizmos for it (in the Scene view's Gizmos menu). This will stop drawing the cursor gizmo and the error should go away. If it does not, would it be possible for you to share a bit more info about your use case/setup?

kind regards

I've disabled the ObiRopeCursor gizmo and haven't experienced the error so far, but it happened so inconsistently that there is a decent chance that it wouldn't have happened so far anyway.