Setting up Multi TouchInput for touch devices

Hi, any idea on how to setup multi finger touch recognition in unreal5?
How exactly we can implement touches with UMG ?
What’s the difference b/w TouchInput , Touch1,Touch2…Touch10?
How to map these input as on click events for buttons in UMG?
Thanks!

Hey there @Krishna_Chaithan1! Welcome to the community!

So if you’re looking in you input system, touch inputs 1 - 10 are actually the numbers of fingers that are touching. Touch 2 is when your second finger makes contact. If you want to trigger touch 4, you’d then have to put a 4th finger on the screen.

image

These are great for specific interactions like when you want to answer console commands on the 4th touch (as is default in UE).

However, if you wanted to process the touch inputs themselves a bit, you may want to use the generic touch even, which also gives you the location and finger index (the touch number) with it, and you can even check if it was moved.

image

UMG is a bit different with touch controls, because the way UI works is that it relies on a focus system to determine if it should accept a click elsewhere if there’s already another element being used. That can be easily stopped by unticking IsFocusable in each of the buttons. That and using on pressed Aside from that however, UMG is almost completely the same in usage.
image
image

There’s also pinch, flick, and rotate gestures built in.
image

If you have any specific questions I can also answer them as well. Also dropping a swipe gesture tutorial.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

3 Likes

How do I use UMG buttons and input touch together?

Hey there @automatic_colors! Welcome to the community! If your uncheck the IsFocusable bool on the respective UI elements, you should still be able to click the screen itself while also interacting with the buttons.

Hi, How can i implement touch steering wheel UI for vehicle control. I tried it by using the touch input position, it worked fine on desktop (mouse click as touch), but it doesnt worked well on android device, it worked differently on different devices. Thanks.