Distance interferes with widgets

Hello everyone!
I created buttons with widgets and then placed them as components within a bp actor so that I could move them around the scene at will (first screen). When I go into play and click on the buttons, only 2 and 3 open the text while 1 does not (second screen). If, on the other hand, I place all 3 so far apart that they unfortunately leave the portion I need, they all open again. It is as if there is an interference caused by the distance. Do you know how I can solve it?

Thanks!

Those borders overlap and only the topmost one receives input, blocking parts of the ones underneath.

When you show the borders, rather than setting them as Visible (as in the other thread), set them their Viability to Not Hit-Testable (Self And All Children)

I’ve tried but unfortunately they still don’t work correctly.

This is the widget and I set all 4 of them this way.

This is not what I meant. I meant this:

You can pass Handled / Unhandled in order to have the input propagate further.


But, the issue is this, right?

While 3 is open, you cannot click on 1, correct? I think the widgets are simply not laid out properly. Could you show the designer and the hierarchy?

Regardless of whether 2 or 3 are open, I don’t get 1 open, and if I also put button 4, none of the others open anymore.

I think I know what is going on.

Does this mean that you have 4 separate widgets? You had to do the whole thing 4 times? So every actor’s component has a DIFFERENT class assigned? This also means that the visibility of each class can be incorrect - as it was in the previous post.


Do tell. Because all of this should use 1 widget with some variables you just edit. You design a widget once, but use it many times - just with different text / button icon.

I made the first widget which was button 1 and then simply duplicated it 3 more times changing the icon to the button and the text. Then I inserted them individually as 4 bp actor components to put them in the scene where I needed them most. But the 3 widgets are duplicates of the first one. I simply renamed them for ease

So what happens if you have 120 of these and you want to update the colour of the border? You’ll need to open 120 widgets and update 120 borders. See where I am getting with this :frowning: And if you make a mistake somewhere and flip a wrong switch, something will stop working. This is just the beginning, as soon as you run into an small issue, it becomes a debugging nightmare.

So I should create one widget with all 4 buttons in it and then in the actor bp how do I indicate the component I need?

No, 1 widget, 1 button, 1 layout. Use this widget in the component and feed it data. This way you have x individual instances of the same widget that behave the same way but each has unique data you can modify without even opening the widget - you do it directly in the scene.


This may or may not be relevant to the widgets currently blocking one another here, but it would, at least, make debugging and maintenance possible. I think the components are blocking one another somehow. I’ll try to post something a bit later.

Should I redo the widgets to see if I can fix the interference between them?

Here’s the thing. Widget components create pieces of solid geometry they render their content on:

Just like with regular meshes, these will block each other and there’s no neat way around this (that I know of) without going down the MultiLineTrace lane or checking each pixel. And even the Widget Interaction Component will not help here as it simply simulates what the mouse is doing with another trace, hitting stuff all the same.


Since the borders are so large and so close that they will, inevitably, obstruct each other, you may want a slightly different approach here.

  • switch to Screen Space mode:

image

This would give you much better looking widgets and no nonsense with collisions.

  • or, if you must use World Space, have 2 widget components instead. One will have just a colliding button, and the other a non-colliding border:

This way, this giant piece of geometry will not get in the way.

But you’ll need to deal with zFighting if you ever align them perfectly in the same axis.

To close / open:


Regarding not having to create 120 different widgets I mentioned previously, have a look here:

I thank you you were really kind and I understood the problem…I just have one last question, if I put them in screen then I lose the ability to manage them in 3d space right? they will look like they are in 2d and that so while with gestures you move around the room, they stay stationary on that point?

Aye, they will be flat and glued to the screen and follow 3d coordinates:

  • Screen Space:

  • World Space

Oh I see! Thank you very much for the help!!