Touch input index and Pressed/Released events

I stumbled upon an issue while trying to add multitouch to a game (in version 4.13): I’m getting Released and Pressed events for fingers that are still pressed on the screen.

Each finger that touches the screen fires a Pressed event, but releasing the finger with the highest index causes all other indices to fire a Released event, immediately followed by a Pressed event.

For instance, if I am pressing 2 fingers on the screen, releasing index 2 will cause a Released and a Pressed event for index 1.
Similarly, with 3 fingers, releasing index 3 will cause a Released and Pressed event for indices 1 and 2.
Releasing any other finger simply causes a Released event for the corresponding index.

Has anyone encountered this, or am I doing something wrong somewhere?

KashiKyrios,

Thank you for bringing this to our attention. I went ahead and tested this issue and verified that multi-touch is working correctly in UE 4.13. Would you mind showing me how you set yours up, I’d be more than happy to try and reproduce your blueprint and see what the issue may be.

Thanks!

Thanks for your answer!

I have tried a few different things:

  • adding an action mapping for Touch 1 and Touch 2, using GetPlayerController and GetInputTouchState to check which index is used;
  • using the Input Touch event, and checking for Touch 1 or Touch 2;
  • using the Touch 1 and Touch 2 events directly.

I removed all functionality from those events, and simply plugged strings to the Pressed and Released pins of each.
For reference, I attached screenshots of the setup.

I unfortunately don’t have access to other phones to test whether it’s a device-specific issue (the device I use is a Wiko Darkmoon on Android 4.2.2).

Also, as a side-question: is there any way to debug Blueprints while the project is launched on a device? That would help immensely.

We do not have a Wiko Darkmoon available to test on but I did test on the Samsung Grand device which is on Android 4.2.2. I received the touch notifications on this device without any trouble.

Here is what my blueprint looks like, and also a screenshot from the device:

It seems to be device specific. You could provide me the following information and I’ll be more than happy to see if the provide any additional clues:

  • Attach your phone to the computer
  • Go here: C:\android-sdk-windows ools
  • Open up Monitor.bat
  • Launch the program and save the

If you cannot get Monitor.bat to open, please go to:

  • C:\android-sdk-windows ools\lib\monitor-x86
  • Open up Monitor.exe
  • Follow the instructions above

Make sure that you highlight all of the , because they do not save unless they’re highlighted.

Thanks!

I launched the monitor through monitor.exe, as the .bat wouldn’t work for me.
Does it matter if I launch the app from the editor or directly from Android? The I attached to this post were obtained by launching from Android directly.

Also, I added a gif with a time display to show how fast the events occur, both Released events and the new Pressed event occur within roughly 1 ms.

KashiKyrios,

Thank you for providing us with additional information. I ran additional tests with our Android Developer and have not been able to reproduce the issue.

I have a few questions for you:

  1. Do you by any have any damage on the screen?
  2. What about a screen protector?
  3. Are you wiggling or finger (or stylus) in a manner that would seem as if it disconnected from the screen?

Please try to replace your print string with a print text node and it should post the multitouch to your logcat when you’re testing. It’ll make it easier for you to determine whether or not the press and release functionality is working correctly on your phone.

Good luck!

There is no screen damage, and no screen protector on the phone.
Actually, I just borrowed a Nexus 7 running on Android 5.1.1, and there is no issue with this device, so the problem does seem to come from either my phone, or how UE4 works with it.

I attached new after replacing the Print String nodes with Print Text, and also checked that the events match what I’m experiencing ingame.

In the mean time, I’ll try and work around the issue by keeping track of the number of touches between frames.

Thank you for providing additional . We suspect that there might be an issue with the driver on the Darkmoon device relating to touch. Since we do not have a device of the same type here, we believe that adding in a check that will keep track of the number of touches between frames may be your best bet when working with your Darkmoon.