I have a doubt about UIS.TouchPan. While using the code provided in the documentation, the “velocity” print is always 0, 0. Thats normal? docu says Velocity is “The speed of the pan gesture (in pixels) per second”. But no matter how fast I move my finger on the screen its always 0,0
local userInputService = game:GetService("UserInputService")
userInputService.TouchPan:Connect(function(touchPositions, totalTranslation, velocity, state, gameProcessedEvent)
print("Speed of touch drag: "..tostring(velocity))
My second question:
I want to use UIS.TouchPan But, it seems not recognizing inputs in studio, only when using a real touchDevice, am I right?
The code you provided works perfectly on a real mobile device; tablet and or phone (which you have stated at the bottom of your post)
In addition, the studio emulator isn’t really the best when it comes to emulating outside devices. For example, emulating from computer to mobile, and or computer to console. The input types are completely different. You’re better off testing it on a real mobile device.
If you want, you could probably file a bug report for this because I suppose it’s a bug. Mild, but nonetheless, a bug.
Thank you so much for your reply!
Yes Im doing the tests on a touchDevice and checking prints. Right now the fact that I always get the velocity parameter on 0,0 when using a touchingDevice, makes me think its on my end maybe, probably my phone is glitching or something…
Not really important cause I had enough params to accomplish my goal, velocity was not really important.
Thank you for clarifying, yes, emulating a touchDevice on Studio is not reliable yet, I cant even imagine how to handle “pinch” unless using a real touchDevice… which turns testing a little more complicated, but, acceptable. Thank you
Thank you for providing that information and for investing your time in testing. It’s helpful to know that the lack of functionality is consistent across all emulated devices.
Honestly, I’m not entirely sure about the issue with my device. It hasn’t sustained any physical damage. However, since the internal memory has become almost full (im not sure if thats the reason…), occasionally, when I unlock the phone to use it, the touch display fails to recognize any movement. After a few seconds, it returns to normal. Once it’s in its normal state, I don’t notice any significant issues while using it… but, there is a chance that I may not be noticing a minor issue or something that’s not easily perceptible to eye
That last answer from the Staff on the second post its a relief, so xmas fix in december related with the velocity bug, awesome!
Thank you for providing those posts! Seems that I was unable to find those posts while researching for this bug…