Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 971 Bytes

File metadata and controls

20 lines (12 loc) · 971 Bytes
uid input-system-bind-touch-input

Bind touch input to an action

You can use touch input with Actions, like any other pointer device. To use actions with touch devices:

  • Associate bindings to the pointer controls available in the Pointer class. For example, <Pointer>/press or <Pointer>/delta.

This gets input from the primary touch, and any other non-touch pointer devices.

Get input from multiple touches

If you want to get input from multiple touches in the action:

  • Use bindings like <Touchscreen>/touch3/press to bind to individual touches.
  • Alternatively, use a wildcard binding to bind one action to all touches. For example, <Touchscreen>/touch*/press.

If you bind a single action to input from multiple touches, set the action type to pass-through so the action gets callbacks for each touch, instead of just one.