UMG Widgets block input to Virtual Joysticks

Hi,

I’m trying to get virtual joysticks working in a project, the rest of the HUD is constructed using UMG. It looks like the canvas panel is blocking input to the virtual joysticks. There are no HUD elements over the joysticks so they are not being blocked by other objects that have a hit test on them.

Has anyone got any ideas? Or an alternative to the joysticks?

Thanks.

1 Like

I actually found out what the problem is, though you may or may not be able to use the solution depending on the use your HUD has.

The issue is, the joysticks are behind the HUD. If you have set your HUD to “Visible,” then your mouse will click the HUD before the joysticks, making accessing the latter impossible. In my case, the HUD is purely cosmetic and player feedback, so I set my HUD’s visibility to “Hit test invisible” and it works just fine. If you don’t have any important buttons that should be always accessible on your HUD, this may be a solution for you.

I’m having the same problem, but i have an UMG button, so to set the visibility to “Hit test invisible” will not work.

Any Ideas?

Try “Self Hit Test Invisible.” By the description, it sounds like it treats all blank space as game screen, basically.

Not worked, I tried all the visibility.

Are you setting the visibility on the button? or the entire widget? These are separate sets of settings. For my solution, I had to set it for the entire widget canvas space.

“For my solution, I had to set it for the entire widget canvas space.”
Agree - I hade the same problem: I had 2 UMG widgets, first is main HUD and second is open when player for example read a book in my game. After opening second HUD and close it my Virtual Sticks didnt work. What I tried:

  1. Change first HUD (entire widget) to self hit test invisible - didnt helped.
  2. Change second HUD (entire widget) to self hit test invisible - didnt helped.
  3. Change all HUDs (first&second) to self hit test invisible - IT HELPED, after closing my second HUD my virtual sticks works without problems.

Anyone know how “self hit test invisible” have influence on performance?
It’s better to create all widgets on start of the game and later just change visibility or create main HUD on start and later create other widgets when they will be needed?

1 Like

Solution - Add a new Canvas as a child of your main Canvas, set this new Canvas ‘Hit Test Invisible’, then add whatever images etc. you need as children of the new canvas. Every item below the new Canvas will not block the joystick input, it will be purely cosmetic :slight_smile:

rOb