InputSystem on-screen joystick touchscreen releases prematurely

I have a very odd issue with the InputSystem’s On-Screen joystick:

  • Dragging the joystick works fine when playing in the editor (game mode)
  • Dragging the joystick when the game is loaded does not work consistently. For example. I pull left, and instead of the character continuing to move, they simply stop after a few milliseconds as if the joystick was released. Visually, the joystick handle is still pulled to the left.

I’m using Unity 2019.4.14f1 with InputSystem preview.3 -1.1.0-preview.3

Is anyone else dealing with this issue? I believe it may have to do with switching between touchscreen and gamepad controls on mobile, but I do not know how to prevent this from happening [???]

Are you handling your input with the PlayerInput component? If so I noticed that when you hit play and watch the PlayerInput component, on the debug section you can see the ‘Control Scheme’ and ‘Devices’ flicker between ‘Keyboard&Mouse’ and whatever device the joystick is feeding input to(in my case ‘Gamepad’).

I tried getting input from the generated script of my input actions and there is no stuttering and everything works smoothly. Hope that helps.