Touch Input causes movement stuttering

Hi,

In my game I’m using UMG to have some buttons on screen that do various things. One of them causes my character to shoot. I’ve noticed that when I press this button my character will stop for a split second and then resume movement. I checked the forums and saw similar issues that say that the touch input was consuming movement. I tried to replicate it on a brand new Third Person Shooter template. What I did was remove the jump functionality and instead print the number of fingers that are touching the screen. I also removed the condition that checks if only one finger is touching the screen.

The result is that whenever I am moving my character and I press the screen, my character will stutter.

I’m using the latest version 4.7.6 on windows 8.1

EDIT: Another way that you can replicate the issue. Just create a TPS template and launch it on your phone. While you are moving your character try touching anywhere on the screen. You will see that the character stutters.

Hi Swiftle,

Couple of questions for you. For what platform are you developing, and to what device are you launching? Are you using the Launch On from the editor, or are you packaging your project into an apk or ipa and using a bat file or iTunes or a third method to deploy to your device?

Edit: Can you link to the forums threads where you saw the similar issues being reported?

Thanks!

Hi,

I am developing for both android and iPhone. I have tried the game on HTC One M7 and on iPhone 5 both from launch and by packaging it…Here are the other threads where I saw this:

As I said you can try this on a brand new project. Just try moving the character and tap anywhere on the screen while you are still holding the move joypad. If you are using the BP template the following happened in my case. First Input touch event is run. It detects that there is more than 1 finger on the screen so the jump function isn’t called. If you check the values from MoveForward and MoveRight axis they contain the correct values from the move joypad. After the Input Touch node is processed, the engine will process the movement and will try to get values from MoveForwardAxis and MoveRightAxis but this time their values are set to zero for some reason. All of this happens in the same frame and that’s why I am getting those micro stutters. I tried to uncheck consume input on Input Touch as well as increase the input priority for the character but that didn’t check anything. Currently I fix this by calling AddMovementInput after my two finger touch “fails”. However I still find it weird that I cannot have two presses at the same time as this essentially prevents me from doing something like moving the character and shooting/jumping at the same time.

Hi Swiftle,

The inability to press two UMG buttons at the same time is by design. Please see this other AnswerHub thread for more info and a fix.

Thanks!