When Touch Move
Fires continuously while the player drags a finger or cursor across this UI object.
Introduction
When Touch Move is an event in the UI group of UI Events. It fires continuously while the player's finger or cursor drags across this UI object. When it fires, the event hands three values to your script: the Current Position of the touch on the UI object, the Last Offset since the previous frame, and the Origin Offset from where the touch first pressed. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. Touch Move is the dragging gesture of the UI family: while When Pressed and When Released mark the start and end of the touch, this event reports every position in between, which makes it perfect for joysticks and drag handles. The element built exactly for this is the UI Joystick , and simple taps without movement are confirmed by When Tapped . When Touch Move event in the UI Editor Image The When Touch Move event in the UI Editor. caption When Touch Move, Fires when the player drags a touch across the UI panel. This event belongs to the "UI" group in UI Events. Trigger: fired by player. Event outputs: Current Position, Last Offset, Origin Offset.
Parameters
Current Position where the finger or cursor is on the UI object right now Last Offset how far the touch moved since the previous frame Origin Offset how far the touch has moved from where it first pressed Parameter Description
How to Access
How to Access - When Touch Move
Example
When Touch Move event with a Move Card command when-touch-move-example.webp Example: a toast shows the current touch position while the finger drags. caption
How to Use
Open the UI Editor and press the UI Property button (the document icon in the top toolbar) without selecting any element, the UI Base panel opens on the right. In the panel's Event Triggers section, find When Touch Move and press Scripts + next to it, then add the actions that should run when the event fires: what should follow the touch while it moves, such as updating a position. Keep the connected actions light, because this event can fire many times per second. Press Play and drag across the panel to confirm it keeps firing during the movement.
Common Uses
Drag cards, items, or panels around Track finger position over a surface Build custom drag controls
Tip
Because this event fires very often, heavy actions here can slow the UI. Do the heavy work once on press or release instead.