Bug definition: Touch input’s moved event doesn’t fire until you interact with a widget or joystick.
To reproduce follow these steps:
-
Create a clean level
-
Go to Project Settings>Input>Touch Interface. Set this to “Default Virtual Joystick”, which is an engine content.
-
Enable “Use mouse for touch input” here.
-
Add nodes you see in the image below to your custom player controller. Set this as your player controller.
-
Press play.
-
Don’t touch anything!
-
Be careful, don’t interact with the joysticks while doing this: Try to move your mouse over the viewport while clicking. You will see that outputs are only “pressed” and “released”. “moved” output won’t be generated
-
Click or use one of the joysticks.
-
Now it works. What changed now?
I wasn’t able to reproduce this on 4.10. This problem started after I upgrade my project to 4.11. I was able to reproduce on another computer. I didn’t test on another project but I expect it to behave in same way.
I can also reproduce this by using “SetInputMode…” functions, during runtime. Once I use one of these three functions, I have to tap a joystick to make InputTouch>MovedEvent work.
This problem doesn’t occur on Android phones, it only occurs on PC.