Enhanced Input System Drag Distance Custom Trigger

And a more sophisticated version. This one can distinguish following:

  • Click
  • Click-Drag
  • Click-Drag Release


Here’s how it will work on the IA Event:

  1. Started will always trigger for both Click and Click-Drag actions, so you can trigger whatever is shared between the two.
  2. Ongoing will trigger during click dragging, it will never trigger for Click only.
  3. Cancelled will trigger only for Click, as in Click-Drag did not happen because user has released the button before moving the cursor far enough
  4. Completed will trigger only for Click-Drag, when user has released the button beyond the cursor distance threshold.

However it would still be appropriate if this came with EIS out of the box, so we didn’t have to create this essential input functionality from scratch.