Enhanced Input System Drag Distance Custom Trigger

This screenshot describes how to Blueprint a custom EIS Trigger which will trigger only once when mouse cursor exceeds certain distance (5px in the example) from the press down starting point:


Note that the custom variables: Triggered, Started and InitialCursorPosition are BP class member variables, not local function variables.

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.