@@ -2643,6 +2643,74 @@ events:
26432643 thread_safety : Unsafe
26442644 capabilities : []
26452645 writeCapabilities : []
2646+ - name : UserInputService.TouchDrag
2647+ summary : |
2648+ Fires when a user drags at least one finger on a
2649+ `Class.UserInputService.TouchEnabled|TouchEnabled` device at a speed
2650+ above a certain threshold.
2651+ description : |
2652+ The `TouchDrag` event fires when a user drags at least one finger on a
2653+ `Class.UserInputService.TouchEnabled|TouchEnabled` device at a speed
2654+ above a certain threshold.
2655+
2656+ This event triggers the first time this speed is exceeded, even if
2657+ the user has not lifted their finger from the device.
2658+ Use it to detect the start of a directional drag gesture and to track
2659+ the movement of the user's finger along a specified axis.
2660+
2661+ You can use `TouchDrag` with `Class.UserInputService.TouchSwipe|TouchSwipe`.
2662+ For example, you can use `TouchDrag` in a scrolling list of clothing accessory
2663+ items to detect when a user horizontally drags on an item to reveal context actions,
2664+ and then use `Class.UserInputService.TouchSwipe|TouchSwipe` to detect the
2665+ user's finger swipe when they add the item to their outfit.
2666+
2667+ The `TouchDrag` event only fires when the Roblox client window is in focus, and
2668+ it can only be used in a `Class.LocalScript`. Inputs are not captured when the
2669+ window is minimized.
2670+
2671+ For more precise tracking of touch input movement,
2672+ use `Class.UserInputService.TouchMoved`.
2673+
2674+ ##### See Also
2675+
2676+ - `Class.UserInputService.TouchTap`
2677+ - `Class.UserInputService.TouchTapInWorld`
2678+ - `Class.UserInputService.TouchLongPress`
2679+ - `Class.UserInputService.TouchMoved`
2680+ - `Class.UserInputService.TouchPan`
2681+ - `Class.UserInputService.TouchPinch`
2682+ - `Class.UserInputService.TouchRotate`
2683+ - `Class.UserInputService.TouchStarted`
2684+ - `Class.UserInputService.TouchSwipe`
2685+ - `Class.UserInputService.TouchEnded`
2686+ code_samples :
2687+ - UserInputService-TouchDrag
2688+ parameters :
2689+ - name : swipeDirection
2690+ type : SwipeDirection
2691+ default :
2692+ summary : |
2693+ Indicates the direction the user swiped.
2694+ - name : numberOfTouches
2695+ type : int
2696+ default :
2697+ summary : |
2698+ The number of touches (for example, fingers) involved in the gesture.
2699+ - name : gameProcessedEvent
2700+ type : bool
2701+ default :
2702+ summary : |
2703+ Indicates whether the Roblox engine internally observed this input and
2704+ acted on it. Generally, this refers to UI processing; if a button
2705+ is touched or clicked from this input, `gameProcessedEvent` returns
2706+ `true`. This also applies to input events connected through
2707+ `Class.ContextActionService`.
2708+ tags : []
2709+ deprecation_message : ' '
2710+ security : None
2711+ thread_safety : Unsafe
2712+ capabilities : []
2713+ writeCapabilities : []
26462714 - name : UserInputService.TouchEnded
26472715 summary : |
26482716 Fired when a user releases their finger from the screen on a TouchEnabled
@@ -2692,6 +2760,7 @@ events:
26922760 - `Class.UserInputService.TouchPinch`
26932761 - `Class.UserInputService.TouchRotate`
26942762 - `Class.UserInputService.TouchSwipe`
2763+ - `Class.UserInputService.TouchDrag`
26952764 - `Class.UserInputService.TouchStarted`
26962765 code_samples :
26972766 - UserInputService-TouchTap
@@ -2766,6 +2835,7 @@ events:
27662835 - `Class.UserInputService.TouchPinch`
27672836 - `Class.UserInputService.TouchRotate`
27682837 - `Class.UserInputService.TouchSwipe`
2838+ - `Class.UserInputService.TouchDrag`
27692839 - `Class.UserInputService.TouchStarted`
27702840 - `Class.UserInputService.TouchEnded`
27712841 code_samples :
@@ -2847,6 +2917,7 @@ events:
28472917 - `Class.UserInputService.TouchPinch`
28482918 - `Class.UserInputService.TouchRotate`
28492919 - `Class.UserInputService.TouchSwipe`
2920+ - `Class.UserInputService.TouchDrag`
28502921 - `Class.UserInputService.TouchStarted`
28512922 - `Class.UserInputService.TouchEnded`
28522923 code_samples :
@@ -2915,6 +2986,7 @@ events:
29152986 - `Class.UserInputService.TouchPinch`
29162987 - `Class.UserInputService.TouchRotate`
29172988 - `Class.UserInputService.TouchSwipe`
2989+ - `Class.UserInputService.TouchDrag`
29182990 - `Class.UserInputService.TouchStarted`
29192991 - `Class.UserInputService.TouchEnded`
29202992 code_samples :
@@ -2992,6 +3064,7 @@ events:
29923064 - `Class.UserInputService.TouchPan`
29933065 - `Class.UserInputService.TouchRotate`
29943066 - `Class.UserInputService.TouchSwipe`
3067+ - `Class.UserInputService.TouchDrag`
29953068 - `Class.UserInputService.TouchStarted`
29963069 - `Class.UserInputService.TouchEnded`
29973070 code_samples :
@@ -3077,6 +3150,7 @@ events:
30773150 - `Class.UserInputService.TouchPan`
30783151 - `Class.UserInputService.TouchPinch`
30793152 - `Class.UserInputService.TouchSwipe`
3153+ - `Class.UserInputService.TouchDrag`
30803154 - `Class.UserInputService.TouchStarted`
30813155 - `Class.UserInputService.TouchEnded`
30823156 code_samples :
@@ -3156,6 +3230,7 @@ events:
31563230 - `Class.UserInputService.TouchPinch`
31573231 - `Class.UserInputService.TouchRotate`
31583232 - `Class.UserInputService.TouchSwipe`
3233+ - `Class.UserInputService.TouchDrag`
31593234 - `Class.UserInputService.TouchEnded`
31603235 code_samples :
31613236 - UserInputService-TouchStarted
@@ -3183,11 +3258,12 @@ events:
31833258 writeCapabilities : []
31843259 - name : UserInputService.TouchSwipe
31853260 summary : |
3186- Fired when a user swipes their fingers on a
3187- `Class.UserInputService.TouchEnabled|TouchEnabled` device - such as the
3188- screen of a mobile device.
3261+ Fires on a
3262+ `Class.UserInputService.TouchEnabled|TouchEnabled` device when a user
3263+ places their finger(s) down on the screen, pans across the screen, and
3264+ lifts their finger off with a certain speed of movement.
31893265 description : |
3190- The TouchSwipe event fires when a user swipes their fingers on a
3266+ The ` TouchSwipe` event fires when a user swipes their fingers on a
31913267 `Class.UserInputService.TouchEnabled|TouchEnabled` device.
31923268
31933269 This event can be used to determine when a user swipes their fingers on
@@ -3214,6 +3290,7 @@ events:
32143290 - `Class.UserInputService.TouchPan`
32153291 - `Class.UserInputService.TouchPinch`
32163292 - `Class.UserInputService.TouchRotate`
3293+ - `Class.UserInputService.TouchDrag`
32173294 - `Class.UserInputService.TouchStarted`
32183295 - `Class.UserInputService.TouchEnded`
32193296 code_samples :
@@ -3321,6 +3398,7 @@ events:
33213398 - `Class.UserInputService.TouchPinch`
33223399 - `Class.UserInputService.TouchRotate`
33233400 - `Class.UserInputService.TouchSwipe`
3401+ - `Class.UserInputService.TouchDrag`
33243402 - `Class.UserInputService.TouchStarted`
33253403 - `Class.UserInputService.TouchEnded`
33263404 code_samples :
0 commit comments