I want to increase player walk speed gradually based on how long they have been walking forward. I know how to do it on PC.
I have not found an API for mobile devices that would let me know if/when the player is interacting with Dynamic Thumbstick in the direction forward.
InputObject.KeyCode throws Enum.KeyCode.Unknown, and UserInputService.Touch event does not fire.
What event/property should I use? Thank you!
https://developer.roblox.com/en-us/api-reference/class/UserInputService
RBXScriptSignal
TouchEnded ( Instance
touch ,bool
gameProcessedEvent ) Fired when a user releases their finger from the screen on a TouchEnabled device - such as the screen of a mobile device
RBXScriptSignal
TouchLongPress ( Array
touchPositions ,UserInputState
state ,bool
gameProcessedEvent ) Fired when a user holds at least one finger for a short amount of time on the same screen position on a TouchEnabled device - such as the screen of a mobile device
RBXScriptSignal
TouchMoved ( Instance
touch ,bool
gameProcessedEvent ) Fired when a user moves their finger on a TouchEnabled device - such as the screen of an Apple iPad or iPhone or a Google Android phone
RBXScriptSignal
TouchPan ( Array
touchPositions ,Vector2
totalTranslation ,Vector2
velocity ,UserInputState
state ,bool
gameProcessedEvent ) Fired when a user drags at least one finger on aTouchEnabled
device - such as the screen of an mobile device
RBXScriptSignal
TouchPinch ( Array
touchPositions ,float
scale ,float
velocity ,UserInputState
state ,bool
gameProcessedEvent ) Fired when a user pinches their fingers on aTouchEnabled
device - such as the screen of a mobile device
RBXScriptSignal
TouchRotate ( Array
touchPositions ,float
rotation ,float
velocity ,UserInputState
state ,bool
gameProcessedEvent ) Fires when a user rotates two fingers on aTouchEnabled
device - such as the screen of a mobile device
RBXScriptSignal
TouchStarted ( Instance
touch ,bool
gameProcessedEvent ) Fired when a user places their finger on a TouchEnabled device - such as the screen of an Apple iPad or iPhone or a Google Android phone
RBXScriptSignal
TouchSwipe ( SwipeDirection
swipeDirection ,int
numberOfTouches ,bool
gameProcessedEvent ) Fired when a user swipes their fingers on aTouchEnabled
device - such as the screen of a mobile device
RBXScriptSignal
TouchTap ( Array
touchPositions ,bool
gameProcessedEvent ) Fired when a user taps their finger on aTouchEnabled
device - such as the screen of a mobile device
RBXScriptSignal
TouchTapInWorld ( Vector2
position ,bool
processedByUI ) Fires when a user taps the game world on aTouchEnabled
device - such as the screen of a mobile device
Please see my solution in this thread:
Thank you. Is there a way to tell apart a touch event related to the Thumbstick controller from any other touch on the screen?
Quote “You can use PlayerModule:GetControls():GetMoveVector()
”
Does that mean forking the core modules, or is it a function accessible from a normal script? I am looking for a standard API that provides information about the player using the Thumbstick controller. Thank you.
No need to fork. The point is you can use it for all input types, as you stated that your purpose was
“… to increase player walk speed gradually based on how long they have been walking forward.”