Virtual joystick captures touch input

Hello guys,

my UMG buttons do not responed when I have virtual joystick visible, I checked source and it looks like virtual joystick always consider every input as Handled. Is there a way how to make UMG and Joystick co-exist without editing engine source ?

https://answers.unrealengine.com/questions/389381/virtual-joystick-captures-touch-input.html

@NickDarnell, I belive you are the best one to answer this question :slight_smile:

Question 2: Are there some plans on improving virtual joysticks ? Better customization, blueprint exposure…

@NickDarnell doesn’t actually summon me, I just found this post randomly :slight_smile:

I don’t remember the Virtual Joystick handling everything, but it is hit test visible, so if it is hit, it’s only going to continue handling the click along the parental chain of widgets. If you want your buttons to be clickable, they need to be sorted in front of the virtual joystick. Which I thought I did by default, but maybe not. You should just need to add a large Z value when you add the widget to the viewport, if i didn’t.

I thought the way I set it up was,

Viewport

  • New Widgets
  • Virtual Joystick
    PlayerScreen
  • New Player Screen Widgets

Q2 - I know of no plans to improve the virtual joystick in the near future.

Thank you for reply, for some reason it does not work and joysticks completly block input for all other widgets. Can it be caused by changing touch interface during game ?
Basically what I do is that I change touch interface everytime character posseses or unposseses vehicle. Maybe, it is causing joysticks to be on top of UMG widgets.

I can confirm that this happens in clean project too. I did quick test in mobile third person template:

  • Set Use Mouse For Touch to true
  • Set Always Show Touch Interface to true
  • Create empty widget blueprint with one button
  • Add this widget blueprint to screen with bShowMouseCursor set true

f9bab9db04d4d6ed9d89421d40d0765769883d8d.jpeg

Bump… Any feedback on this, please ? :slight_smile:

Okay, so input to my widget does not pass because It is added using Add To Player Screen. I needed to add it to screen via Add To Viewport and set ZOrder to something higher than zero.