Hey everyone,
I’ve been trying to create UI buttons which pop up a small window with information when a player taps and holds on a button for a small amount of time (1-2 seconds). This type of thing is quite common in mobile games, however, I can’t seem to figure out how to do it for touch devices.
I’ve scoured old threads like this one: Input Held Down? - Blueprint - Epic Developer Community Forums and this one: Action on Button Held Down? - Programming & Scripting - Epic Developer Community Forums
and found how to do what I need with key inputs, using “Get Input Key Time Down”, however from my testing, this seems not to work with touch inputs.
Just as a test, I used the example in the above thread, and came up with this:
When I run the game and tap on the button, it flows to the “FALSE” result of the second branch, and prints 0.0 each tick regardless of how long I hold the button.
Am I just using this wrong? How can I track how long the player has held a tap on the screen? “Touch 1” on the “Get Input Key Time Down” node doesn’t seem to produce the desired result. Other people in the above threads have found it to work for their keyboard or controller inputs, but I have yet to see someone trying something similar for mobile.