Click Billboard UI through the mobile buttons

So I’m having a issue where when clicking a mobile button, the connection doesn’t work when the players movement buttons get in the way. I’ve tried setting it to selected, changing layout order, trying “Activated” as well as “Button1Up”. Nothing is working, not sure what to do.

https://gyazo.com/60d1eb0690e005b4860ebd20f25d2fec

Solution (Somewhat, if you find a better one please post) Click Billboard UI through the mobile buttons - #10 by 4slug

You need to place a large (eg full screen) button behind it. Button should be fully transparent. It is there to swallow the click.
Clicks on Gui elements flow through to the 3d world, and the Active property does nothing.

A clarification about Active. The API documentation makes it clear enough that the Active property has no effect on the pass-through of click events in the 2d world to the 3d world. Active only relates to 3d-to-3d elements. Personally I think there should be a property to stop 2d-to-3d events like this. It should even be the default perhaps. But in this case it wouldn’t really matter. This is because your hand button is so small, relatively speaking, that misclicks will happen a lot. They’ll try to press the hand, but miss and press the block. This could be frustrating for users.

2 Likes

What would that do? Wouldn’t that just make it fire incorrectly as if the person clicks anywhere it would go off? Im confused

The invisible button is behind the hand button seen in your video. No action is performed when it is pressed. The event is “swallowed”.
If they press on the hand, perform the hand’s pressed function.

I am assuming the “hand button” is a Gui element. Is it? It appears to be a BillboardGui on second inspection, so the invis button can’t be full screen.

1 Like

That does nothing, it still has the same error. The issue is that the mobile buttons are blocking everything beneath it.

https://gyazo.com/e18699f6fbc37f54b559fe38446eebb4 Additional Gif of whats happening, the entire touch area is completely breaking the click detection, should I instead put this on bug reports?

  1. is the hand button part of a Billboard Gui?
  2. if so, why isn’t the “click swallow” button (seen in your latest gif, dark grey, bottom left hand corner) not placed behind the hand button?

to do this, it has to be part of the Billboard Gui that contains the Hand button.

No, I’m quite certain this isn’t a bug.

Yes it is a billboard Gui, that gif didnt contain the click swallow, thats the mobile button thats blocking the click. The click swallow did nothing

Ok. Sorry for sending you on a wild goose chase. I misunderstood the issue.

So I got it kind of working, this is a sketchy and kinda gross solution but on the off chance someone reading this finds it helpful here you go:

Every single frame I set the active property of this element (the built in mobile button) to false
image

Yes, this is a janky and pretty poor solution but at the moment its the only one I can find. If you don’t set it every frame it will change back, and I only set it the frames that the button is visible so that way if active does anything (doesn’t seem to run differently) it wont interfere. If no one can find a solution I’ll probably move this to bug reports.

Anyway the end result is this:
https://gyazo.com/bedb46e12a43ba24d8100c504902e0f5