GUI input sinking is janky for 3D use cases

It is common to want to place clickable 3D objects in the world using SurfaceGuis, BillboardGuis, or ScreenGuis (with position computed every frame).

When we have GUIs appearing in the 3D world we often want them to coexist peacefully with other things which consume user input, such as camera controls (rotating and zooming) or the game’s own bindings.

But to make these GUIs clickable using normal TextButtons or ImageButtons (or to have other GuiObjects which respond to input) we must make set Active = true so that ALL input which occurs over the GUI is sunk.

This is extremely annoying because it means we need to make custom buttons if we want to prevent bad UX in situations involving these 3D GUIs. And in using custom buttons, a part of our game is now responding to input differently (i.e. it is not sinking input AT ALL) and will start causing bugs like two actions being processed for a single input which must be fixed by further increasing the complexity of the codebase.

Ideally, we should be able to specify which inputs are relevant for a particular GuiObject so that we can avoid unnecessarily sinking inputs and creating headaches.

e.g. MouseButton1 is usually the relevant input for buttons, and the scroll wheel is an additional relevant input for ScrollingFrames (and MouseButton1 too, but only when over the scroll bar).

4 Likes