diff --git a/Assets/Scripts/Tools/FreePaintTool.cs b/Assets/Scripts/Tools/FreePaintTool.cs index c033b27843..884e8fff01 100644 --- a/Assets/Scripts/Tools/FreePaintTool.cs +++ b/Assets/Scripts/Tools/FreePaintTool.cs @@ -210,6 +210,15 @@ override public void AssignControllerMaterials(InputManager.ControllerName contr void PositionPointer() { + // Discard the pointer if the controller is exactly zero + // as it probably indicates the controller tracking stalled this frame + // TODO:Mikesky: See if can be done at input level + if (InputManager.m_Instance.GetControllerBehavior(InputManager.ControllerName.Brush).transform.position == Vector3.zero) + { + Debug.LogError($"Controller Glitch!"); + return; + } + // Angle the pointer according to the user-defined pointer angle. Transform rAttachPoint = InputManager.m_Instance.GetBrushControllerAttachPoint(); Vector3 pos = rAttachPoint.position;